Skip to content

Instantly share code, notes, and snippets.

@ifucolo
Created February 24, 2017 20:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ifucolo/2ad6201f04a164e934231a7b80fe2810 to your computer and use it in GitHub Desktop.
Save ifucolo/2ad6201f04a164e934231a7b80fe2810 to your computer and use it in GitHub Desktop.
supportPostponeEnterTransition();
Glide.with(this)
.load(imgUrl)
.listener(new RequestListener<String, GlideDrawable>() {
@Override
public boolean onException(Exception e, String model, Target<GlideDrawable> target, boolean isFirstResource) {
supportStartPostponedEnterTransition();
return false;
}
@Override
public boolean onResourceReady(GlideDrawable resource, String model, Target<GlideDrawable> target, boolean isFromMemoryCache, boolean isFirstResource) {
supportStartPostponedEnterTransition();
return false;
}
})
.into(new SimpleTarget<GlideDrawable>() {
@Override
public void onResourceReady(GlideDrawable resource, GlideAnimation<? super GlideDrawable> glideAnimation) {
photo.setImageDrawable(resource);
mAttacher.update();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment