How Do Load Images in Glide with Animation [Closed]

I am using glide to load image from server image and it is showing suddenly without any animation. I need to display the image with fading animation, please give me some suggestions on this.

You have to use transitions() API in the GLIDE builder call. Here are 2 possible ways you can achieve this.

1) By using transitions API : Official Documentation

GlideApp  
.with(context)
.load(....)
.transition(DrawableTransitionOptions.withCrossFade()) //Here a fading animation
.into(....);

2) By creating a TransitionFactory : SOF Answer by user tudor

 GlideApp.with(this)
  .load(url)
  .transition(DrawableTransitionOptions.with(Your_custom_factory))
  .into(image)

Hope this helps

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest