Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
Still crashing with Compose 1.7.4.
I also tried moving sharedElement to BoxWithConstraints (rather than in its content), but did not help.
So the layout hierarchy looks like this (with more details and with "..." I replaced series of "normal" layouts):
NavHost -> ... -> AnimatedVisibility -> ... -> BoxWithConstraints with sharedElement -> some content
\> ... -> AnimatedVisibility -> ... -> LazyList -> ... -> Animated Visibility -> Selection container -> BoxWithConstraints with sharedElement -> some content
Any ideas?
I also tried moving sharedElement to BoxWithConstraints (rather than in its content), but did not help.
So the layout hierarchy looks like this (with more details and with "..." I replaced series of "normal" layouts):
NavHost -> ... -> AnimatedVisibility -> ... -> BoxWithConstraints with sharedElement -> some content
\> ... -> AnimatedVisibility -> ... -> LazyList -> ... -> Animated Visibility -> Selection container -> BoxWithConstraints with sharedElement -> some content
Any ideas?
[Deleted User] <[Deleted User]> #3
In your BoxWithConstraints
do you do any conditional composition? Things like:
if (constraintsExceedsCertainThreshold) composeSomeContent() else someOtherContent()
ap...@google.com <ap...@google.com> #4
No, it's just a `Text` which has different style depending on constraints.
Also note `sharedElement` is put on `BoxWithContraints` now, not on the content.
Thanks!
Also note `sharedElement` is put on `BoxWithContraints` now, not on the content.
Thanks!
il...@google.com <il...@google.com> #5
Based on the stacktrace, it seems like the item in question is composed but never placed. Do you use custom precompose
or prefetch logic in your lazy list?
ap...@google.com <ap...@google.com> #6
No, nothing custom. Just the default prefetch logic.
There is also one `AnimatedContent` above the `BoxWithConstraints`. Could this cause issues?
Thank you for looking into this.
There is also one `AnimatedContent` above the `BoxWithConstraints`. Could this cause issues?
Thank you for looking into this.
Description
Component used: Navigation
Version used: 2.2.0, 2.3.0, 2.3.1
Devices/Android versions reproduced on: 10.0, 9.0 - probably not related
Description:
I've updated two dependencies in my project:
and now I see that
NavController::navigate
needs to be called from the main thread. OtherwiseNavBackStackEntry
throwsIllegalStateException
when trying to register lifecycle observer.Stacktrace:
There were no changes in documentation so I assume that this behavior is unintended.