2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Glideで連続で1枚のViewにCenterCropした画像をフェードインして表示する

Last updated at Posted at 2018-01-12

Glide 4で実装した

.thumbnail にGlideで読み込んだ画像を当て込むといい感じにクロスフェードする

Glide.with(view.context)
        .load(image)
        .apply(RequestOptions().centerCrop())
        .thumbnail(Glide.with(view.context).load(p).apply(RequestOptions().centerCrop())) // 1個前の画像をサムネイルとして表示してスムーズに画面切り替えを実現する
        .transition(DrawableTransitionOptions.withCrossFade())
        .into(view)
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?