Fixed
Status Update
Comments
il...@google.com <il...@google.com>
pe...@gmail.com <pe...@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
[Deleted User] <[Deleted User]> #3
Is there any info if it's planned to be implemented?
pe...@gmail.com <pe...@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.
da...@gmail.com <da...@gmail.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.
il...@google.com <il...@google.com> #6
il...@google.com <il...@google.com>
il...@google.com <il...@google.com> #7
This allows you to call onSupportNavigateUp() (or super.onSupportNavigateUp() if you're using an ActionBar) from that method to have your Up button transition between activities.
This will be available in 1.0.0-alpha09.
su...@gmail.com <su...@gmail.com> #8
There is Jarks when implementing this way to navigate up between activities.
Description
Version used: 1.0.0-alpha01
Devices/Android versions reproduced on: -
Overriding onSupportNavigateUp() helps with the up button behaviour in the navigation architecture components, which is great. However if you have multiple activities the up button does not navigate up to the previous activity. It would be great if it would support that, especially for the migration to the navigation component.