animation-samples icon indicating copy to clipboard operation
animation-samples copied to clipboard

[Unsplash] Reenter transition not working edge case

Open thespacemanatee opened this issue 4 years ago • 0 comments

Hello,

Thank you so much for making this really helpful example. I found an edge case when swiping to images that are not initially visible in the RecyclerView of the source activity:

Working:

  1. When we tap on the first row of images (first 3 images)
  2. Swipe to the last image
  3. Press back to go back to the previous activity, shared element reenter transition works

Demo

https://user-images.githubusercontent.com/6837599/163337604-af967aee-94bb-40de-bebd-8a153fdfa152.mp4

Not Working:

  1. When we tap on any other image
  2. Swipe to the last image
  3. Press back to go back to the previous activity, the shared element reenter transition does not work

Demo

https://user-images.githubusercontent.com/6837599/163337637-0786f7f4-86bb-4d32-bdf8-1e85e3389fe2.mp4

I thought that perhaps it's because the ViewHolder in the not working example wasn't visible hence the transition mapping won't work, but why does it work when we tap on the first row of images? In any case, how can we fix this issue?

thespacemanatee avatar Apr 14 '22 07:04 thespacemanatee