Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
Do you have a sample project that reproduces your issue?
What do you mean by 'a regular back'?
ky...@gmail.com <ky...@gmail.com> #3
It means back button (in 3-button navigation) or quick gesture (in gesture navigation).
jb...@google.com <jb...@google.com>
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
commit ba9207cd04a8e832b6bcdd38e39d0084cefba6ec
Author: Jeremy Woods <jbwoods@google.com>
Date: Thu Feb 22 20:56:27 2024
Ensure non-gesture Systemback has transition in Compose
When using system back, the NavHost `inPredictiveBack` flag flips from
false to true, starting a predictive back gesture, then back to false
which cancels the started gesture and pushes it to completion. This
result in the incoming destination immediately appearing on the screen
instead of transitioning.
We can fix the system back case, by waiting to get progress before
changing the `inPredictiveBack` flag.
There is still the "flick" case that will remain as it is. What we would
need for that is a way to seek the transition to completion from the
current state.
RelNote: "Fixed an issue where NavHost in Compose Navigation failed to
properly transition when using System back without a gesture."
Test: tested in sample app
Bug: 325998468
Change-Id: Iceeae260189dd12af8cb3fe690523646a90f57de
M navigation/navigation-compose/src/main/java/androidx/navigation/compose/NavHost.kt
https://android-review.googlesource.com/2974195
Branch: androidx-main
commit ba9207cd04a8e832b6bcdd38e39d0084cefba6ec
Author: Jeremy Woods <jbwoods@google.com>
Date: Thu Feb 22 20:56:27 2024
Ensure non-gesture Systemback has transition in Compose
When using system back, the NavHost `inPredictiveBack` flag flips from
false to true, starting a predictive back gesture, then back to false
which cancels the started gesture and pushes it to completion. This
result in the incoming destination immediately appearing on the screen
instead of transitioning.
We can fix the system back case, by waiting to get progress before
changing the `inPredictiveBack` flag.
There is still the "flick" case that will remain as it is. What we would
need for that is a way to seek the transition to completion from the
current state.
RelNote: "Fixed an issue where NavHost in Compose Navigation failed to
properly transition when using System back without a gesture."
Test: tested in sample app
Bug: 325998468
Change-Id: Iceeae260189dd12af8cb3fe690523646a90f57de
M navigation/navigation-compose/src/main/java/androidx/navigation/compose/NavHost.kt
jb...@google.com <jb...@google.com> #6
The basic system back case has been fixed in Navigation 2.8.0-alpha04
, the flick case will likely remain for now as we need some further transition support.
ky...@gmail.com <ky...@gmail.com> #7
Will that be tracked in a separate issue?
jb...@google.com <jb...@google.com> #8
You can follow
na...@google.com <na...@google.com> #9
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.navigation:navigation-compose:2.8.0-alpha04
Description
Component used: Navigation
Version used: 2.8.0-SNAPSHOT
Android versions reproduced on: U
Introduced inhttps://android-review.googlesource.com/c/platform/frameworks/support/+/2853474
When a regular back is performed,
inPredictiveBack
will be set to false immediately, causing theAnimatedContent
to recompose.Transition may not complete by the time but will jump to the final state.