Navigation component: shared transitions backward not works
See original GitHub issueComponent 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.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:11 (1 by maintainers)
Top Results From Across the Web
Shared Element Transition not working at all - Stack Overflow
Have you tried postponing the enter transition inside LandingFragment::onViewCreated and manually setting the transition name to the view?
Read more >Navigation Component for Android Part 3: Transition and ...
In this tutorial, you'll learn how to use shared element transitions, action bar and bottom navigation to make an app that shows a...
Read more >Shared element transition on back pressed [118475573]
Shared element transition doesn't works when moves from backStack. That bug presents only if i use Navigation framework and try to implement shared...
Read more >Animate transitions between destinations - Android Developers
Shared element transitions to a fragment destination ... The Navigation component lets you add both property and view animations to actions.
Read more >Shared Element Transition in Navigation Architecture ...
Shared Element transition mainly composes of 3 components: ... However if you navigate back to the first screen the transition doesn't ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think I found the reason with debugging. navigate will create a transaction with
This seems to cause the issue
I found a workaround In calling fragment, add the following in onViewCreated (or at the end of onCreateView)
The GithubBrowserSample contains a shared element transition between an ImageView and another ImageView. When trying to do this between two different element types (such as a list element and the entire detail view, like in gmail when selecting on an email), the return transition does not seem to work. Are there any examples that use shared element transition with navigation component between a list and the list detail view?