Created
February 24, 2017 20:19
-
-
Save ifucolo/2ad6201f04a164e934231a7b80fe2810 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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