Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Attachment actions
Unintended behavior
View staffing
Description
Component used: Fragment
Version used: 1.7.1
Given that two Fragments have enter transitions defined, trying to show both of those Fragments in two separate transactions executed synchronously will result in the second Fragment never entering the resumed state despite being visible and interactable.
I have attached a sample project demonstrating this issue - simply click the "next" button and you'll see that the text indicating whether the second fragment's state is resumed will never transition.
A little more detail without opening the project-
We have a Fragment with transitions defined like so:
When a button is pressed elsewhere in the app, we perform two Fragment transactions with two instances of this Fragment:
This latter instance will never transition to resumed.
A few things I've tried that are able to work around this bug:
setReorderingAllowed()
andcommit()
instead ofcommitNow()
(note that just switching tocommit()
doesn't fix this issue, you also need to allow reordering)I suspect that the transition on the intermediate transaction is simply never finishing because that screen is immediately replaced and that transition not finishing or being cancelled is the root cause here.
Unfortunately the first workaround isn't viable in our application - the way our navigation is currently structured we have two transactions executed serially and synchronously and without performing deeper changes to our navigation there isn't a clear path to asynchronous transactions here. We would like to keep the animations, but could remove them for one of the two screens. This also doesn't seem like expected behavior though.