Hero image transition animation
See original GitHub issueDoing transition animation to detail activity via the hero image
Work to do:
Use ActivityOptionsCompat#makeSceneTransitionAnimation()
. for the animation by passing in activity and the imageview.
Each list item in Plant adapter should use ViewCompat#setTransitionName()
and prefix/suffixed with item position. Both list and detail imageview need to have same transition name. this allows anim to transition backwards when user press back on Detail activity
We need to delay anim in detail via supportPostponeEnterTransition()
until Glide loads the image and then use supportStartPostponedEnterTransition()
https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat.html#makescenetransitionanimation_4 https://developer.android.com/reference/android/support/v4/view/ViewCompat.html#setTransitionName(android.view.View, java.lang.String)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (6 by maintainers)
Top GitHub Comments
@andhie shared element transitions are now available in Navigation 1.0.0-alpha06, which has been merged via #193
@andhie shared element transitions with the Navigation component is in the works: https://issuetracker.google.com/issues/79665225