This repository has been archived by the owner on Aug 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Hero image transition animation #66
Open
andhie opened this issue
Jun 25, 2018
· 7 comments
· May be fixed by softagram/android-sunflower#1 or #196
Open
Hero image transition animation #66
andhie opened this issue
Jun 25, 2018
· 7 comments
· May be fixed by softagram/android-sunflower#1 or #196
Labels
enhancement
New feature or request
Comments
Related to #9 |
For normal fragments, we can use setSharedElement on the FragmentTransaction. but in the case of Navigation, i'm not sure how you achieve this. is it supported at this moment? |
@andhie shared element transitions with the Navigation component is in the works: https://issuetracker.google.com/issues/79665225 |
nudge. this would be great |
@tiembo i have committed some code in my own repo. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Doing 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 activityWe need to delay anim in detail via
supportPostponeEnterTransition()
until Glide loads the image and then usesupportStartPostponedEnterTransition()
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,%20java.lang.String)
The text was updated successfully, but these errors were encountered: