https://kotlinlang.org logo
#compose
Title
# compose
j

james

02/09/2022, 6:31 AM
anyone ever seen a bug with
AnimatedVisibility
where, when wrapping a composable with it, the children of that composable are now backwards? what I mean is, I have this var
isExpanded
and if I simply have two children inside that, ComposableA and ComposableB, it works as expected.. but now I want to animate, and so I replace my check for
if isExpanded
with an
AnimatedVisibility
composable, and now when my children are drawn on screen, they are drawn like ComposableB then ComposableA is this a bug or am I missing something in how to use it?
z

Zoltan Demant

02/09/2022, 6:53 AM
Im just guessing here, but
AnimatedContent
has the concept of
targetContentZIndex
which lets you decide the rendering order during the animation. By default the targetContent is laid out on top of the initialContent. The same thing could be at play here?
d

Doris Liu

02/09/2022, 5:38 PM
Can you share a code snippet and a screenshot of what you see?
2 Views