Fixed
Status Update
Comments
tj...@gmail.com <tj...@gmail.com> #2
Hi all, I've implemented custom navigator to provide with Navigation Shared Elements transition ability https://github.com/lion4ik/aac-navigation-shared-elements-transition
ar...@google.com <ar...@google.com> #3
Is there any info if it's planned to be implemented?
is...@google.com <is...@google.com>
da...@gmail.com <da...@gmail.com> #4
Support for shared elements for both activities and fragments has been added in https://android-review.googlesource.com/c/platform/frameworks/support/+/752138 through the introduction of a general purpose Navigator.Extras interface, providing a way to send a specific Navigator extra information at runtime (such as the Views you want included in shared element transitions).
This means for activity destinations, you can now provide any ActivityOptionsCompat instance you want alongside your navigate() call. For fragment destinations, you provide a map of shared elements. Documentation will be provided for both of these use cases.
This will be available in 1.0.0-alpha06.
This means for activity destinations, you can now provide any ActivityOptionsCompat instance you want alongside your navigate() call. For fragment destinations, you provide a map of shared elements. Documentation will be provided for both of these use cases.
This will be available in 1.0.0-alpha06.
il...@google.com <il...@google.com>
il...@google.com <il...@google.com>
il...@google.com <il...@google.com> #5
Yes, it's worked in 1.0.0-alpha06, but only in forward direction...
Component used: Navigation
Version used: 1.0.0-alpha06
Devices/Android versions reproduced on: All
Fragment one: RecyclerView (GridLayoutManager). Transition name to ImageView is assigned in Adapter from model's name (unique)
Fragment two: Detail Fragment with ImageView and some text data. Transition name retrieved from argument's bundle.
Forward shared transition works excellent, but when I press "back" button there is no transition at all.
In NavHostActivity: override fun onSupportNavigateUp() = findNavController(R.id.nav_host_fragment).navigateUp()
In old paradigm
fragmentManager
.beginTransaction()
.addSharedElement(sharedImageView, transitionName)
all worked fine.
Component used: Navigation
Version used: 1.0.0-alpha06
Devices/Android versions reproduced on: All
Fragment one: RecyclerView (GridLayoutManager). Transition name to ImageView is assigned in Adapter from model's name (unique)
Fragment two: Detail Fragment with ImageView and some text data. Transition name retrieved from argument's bundle.
Forward shared transition works excellent, but when I press "back" button there is no transition at all.
In NavHostActivity: override fun onSupportNavigateUp() = findNavController(R.id.nav_host_fragment).navigateUp()
In old paradigm
fragmentManager
.beginTransaction()
.addSharedElement(sharedImageView, transitionName)
all worked fine.
Description
See sample recording and watch the yellow fragment. When back is pressed from the unoptimized transactions, yellow is NOT visible. When back is pressed from optimized transactions, the yellow IS seen. The behavior is similar for other types of transition animations like fade-in/out.
Sometimes I'll be popping from C to B, in which case I need the postpone to make the transition smooth.
Can the framework handle this somehow and keep B out of sight?
Seeing this in both 25.3.0 and 25.2.0.
Thanks!