Status Update
Comments
il...@google.com <il...@google.com> #2
Hey Doris, any ideas on where this random animation could be coming from?
po...@gmail.com <po...@gmail.com> #3
Re
I tried the repro project locally. I was not able to reproduce in the the tip of tree compose code base, after dozens of attempts. It's possible the issue has been fixed recently.
Could you try the latest androidx snapshot here:
il...@google.com <il...@google.com> #4
Hi! Thank you for checking into it and giving it a try.
Unfortunately, the issue is still reproducible with snapshot 12123985, 2.8.0-SNAPSHOT for navigation, and 1.8.0-SNAPSHOT for compose.
I've pushed an update containing SNAPSHOT dependencies and automated reproduction attempts:
Now, it's sufficient to launch the application and wait.
Here's a new video:
po...@gmail.com <po...@gmail.com> #5
Thanks for the repro in
Initial investigation showed that the enter/exit transitions are correct. What appears like a scale animation is a size transform. During the repeated destination change, there seems to be a frame where the new content is resolved into an empty list of measurables, which is incorrect.
Unclear what's causing this yet - either the content composable is not yet populated for that frame, or the UI tree applier deferred adding the nodes to the tree to the next frame. More investigation will be needed.
il...@google.com <il...@google.com>
jb...@google.com <jb...@google.com> #6
The content composable is indeed empty. It comes from currentEntry
being null here:
Over to Jeremy to investigate further in Navigation.
po...@gmail.com <po...@gmail.com> #7
cl...@google.com <cl...@google.com>
ap...@google.com <ap...@google.com> #8
ap...@google.com <ap...@google.com> #9
I'm also experiencing this issue using Navigation Compose 2.8.3
It also happens with the default animation with null transition arguments. Sometimes it just animates through scale in.
cl...@google.com <cl...@google.com> #10
Likely this is the same issue as
Description
Component used: Navigation / NavigationUI Version used: 2.5.2 Devices/Android versions reproduced on: OnePlus 8T / Android 12
I'm using a menu resource file which is bound to a BottomNavigationView. Also I'm setting up the navigation like so
NavigationUI.setupWithNavController(bottomNavigationView, navController, false)
which means I'm using the experimental version of this API.I don't want the state of each menu item to be saved since I want to come back to the respective start destination if a
BottomNavigationView
item gets reselected. So regardless of how deep I got in a navigation graph a reselection of the same item takes you back to the start destination.I'm using a navGraph which consists of several nested navGraphs like so:
The
one_navigation
could look like this:It works pretty good so far, the point is when I click the first BottomNavigationView's menu item
N times
I got the destinationN+1 times
on my back stack. If I wanted to leave the app by triggering the system's back navigation I'd have to do itN+1 times
.So I actually expect the startDestination to only exist once on the back stack regardless of how often I click the respective menu item setup with the above mentioned API.