We can also tell Glide to keep the original image size. This will decrease the transition delay because the original image will be available from memory, not a disk cache. Watch out: you should do this wisely because it can slow down your app. If you want to do it anyway, here is the branch with this modification.
Shared Element Transition with Glide - Step 3
Now it works as expected bulk mobile database but there’s a little problem with broken links or images on the list that are not loaded.
Shared Element Transition with Glide - Step 3
Step#4: Transit only cached images
The simplest way to have the seamless transition in any conditions is to retrieve the image from cache (or, if it’s not loaded already, just transit a placeholder):
view rawGlideLoader.kt hosted with by GitHub
-
- Posts: 23
- Joined: Mon Dec 23, 2024 3:42 am