Status Update
Comments
tr...@gmail.com <tr...@gmail.com> #2
Other than that, instanceState of the child fragment is preserved properly when navigating back and forth.. It's just that it's view is removed prematurely for some reason.
[Deleted User] <[Deleted User]> #3
So where do we go from here, is this a bug for you to fix, or there's something wrong with my nested navigation graph implementation, in which case I'd like you to point me in the right direction how to fix it?
de...@gmail.com <de...@gmail.com> #4
ab...@gmail.com <ab...@gmail.com> #5
I slowed down the animations so you can see what's happening.
Root Fragment A is the one with BottomNavigationBar on the bottom.
GREEN - Fragment A's CHILD fragment (the one that's disappearing)
RED - Destination Fragment
Press "Settings" in the action menu on the upper right to start navigation. Observe how Root Fragment A is visible during the whole animation with it's BottomNavigationBar, but it's CHILD GREEN fragment disappears immediately, as it is part of the nested navigation graph hosted in the Fragment A itself.
On the way back, Fragment A is properly recreated with it's green child fragment, and both are visible properly (when going back in the direction A <- B).
gu...@thegrizzlylabs.com <gu...@thegrizzlylabs.com> #6
I suspect this is a Fragment issue and not something Navigation can control. I'd be interested to know if you run into the same issue if you have *any* Fragment, rather than a NavHostFragment, between your child of A and A itself.
mi...@booking.com <mi...@booking.com> #7
I'll attach the project directly so you can test it yourself, and if it is the problem with Fragments, then let's open the issue for Fragments..
gu...@thegrizzlylabs.com <gu...@thegrizzlylabs.com> #8
kd...@gmail.com <kd...@gmail.com> #9
Branch: androidx-master-dev
commit c53170c58309d7370d63d5386e83fce4cee02ba2
Author: jbwoods <jbwoods@google.com>
Date: Wed Jun 26 17:58:38 2019
Avoid grandchild Fragment animations running during parent Fragment transactions
Follow-up to aosp/951635. Child fragment views are not destroyed when the parent
is animated, but grandchild fragment views are.
This change checks up the ancestor hierarchy to ensure fragment views
will not be destroyed if any of its ancestors are being removed.
Test: Added unit Test
BUG: 116675313
Change-Id: Ie65ae2fb150340b51bb0362cfa84f320ee2e8c7e
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentAnimationTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManagerImpl.java
to...@gmail.com <to...@gmail.com> #10
to...@gmail.com <to...@gmail.com> #11
to...@gmail.com <to...@gmail.com> #12
as...@google.com <as...@google.com> #13
Provide a 1 line caption in 15 words capturing key details. Start with introducing it like "This image" -
as...@google.com <as...@google.com> #14
Please open another issue for repro without alignByBaseline
for now, this one needs to be fixed separately from lazy from what I can see.
to...@gmail.com <to...@gmail.com> #15
do...@gmail.com <do...@gmail.com> #16
I get the same
java.lang.IllegalArgumentException: no paragraph (layoutCache=ParagraphLayoutCache(paragraph=null, lastDensity=InlineDensity(density=3.5, fontScale=1.0)), textSubstitution=null)
scrolling fast in a LazyColumn in which each element is a ConstraintLayout having various baseline.linkTo(otherRef.baseline)
Removing all baseline constraints and replacing them with
top.linkTo(otherRef.top)
bottom.linkTo(otherRef.bottom)
seems to do as a workaround
I'm using
androidxComposeBom = "2025.01.00"
androidxComposeConstraintLayout = "1.1.0"
se...@google.com <se...@google.com> #17
In general, this error happens when layouts or the core modifier system does incorrect measure/paint passes so each stack is a separate issue.
Description
If this is a bug in the library, we would appreciate if you could attach: