I\'m looking to adopt the Glide library in place of Universal Image Loader but I\'m running into a problem with regards to shared element transitions.
In my simple S
I tried your code and got the same result, then I tried another implementation following this: https://github.com/codepath/android_guides/wiki/Shared-Element-Activity-Transition
And made some changes, which I think are the key here:
The centerCrop should be set on the ImageView, if we set it with Glide it causes the same bug. activity_main.xml
BaseActivity.java On the MainActivity dontTransform should be true and on DifferentActivity false.
public void displayImageGlide(String url, ImageView imageView, Boolean dontTransform) {
if (dontTransform) {
Glide.with(this).load(url)
.skipMemoryCache(true)
.diskCacheStrategy(DiskCacheStrategy.SOURCE)
.dontTransform()
.into(imageView);
return;
}
Glide.with(this).load(url)
.skipMemoryCache(true)
.diskCacheStrategy(DiskCacheStrategy.SOURCE)
.into(imageView);
}
Edit, see how it looks: https://www.dropbox.com/s/30s5l8awxogltls/device-2015-06-23-153153.mp4?dl=0