Shared element transitions improvements#504
Conversation
… starting the transition animation
|
Thank you so much! I was about to give up on the transition animations due to those issues. I am curious: are you aware of any official examples or documentation on this? Expect to see this in the next SeriesGuide release. |
|
I'm not aware of official examples but I've read a few blog posts from George Mount about activity transitions and how to postpone them when necessary. I also faced the same issue in one of my own apps. When using a transition with a list, in some cases the transition waits for the list to be populated, in some cases not, so it's better to manually delay it. |
Changes in #504 are not legally significant. But still attribute the person that proposed it.
Changes in #504 are not legally significant. But still attribute the person that proposed it.
These commits fix 2 issues with the poster shared element transitions:
The adapter position is replaced with a stable id for the transition name. This allows to match the correct poster even if the items have changed position after the activity has been re-created.
When MoviesActivity is re-created, the transition is postponed until after the next layout pass. This gives a chance to the adapters to repopulate the posters, since adapter population is asynchronous. Thanks to this, the poster animation will also work properly after changing the orientation in the details page then navigating back to MoviesActivity, which doesn't work currently.