This is an exciting thing, I look forward to the m...
# compose
c
This is an exciting thing, I look forward to the moment it is completed ๐Ÿคฉ https://android-review.googlesource.com/c/platform/frameworks/support/+/1704159
๐Ÿ‘€ 6
d
๐Ÿคฃ I also look forward to that! This change list depends on
Transition<*>.AnimatedVisibility
, which is a new feature introduced in beta-07. (The same release also introduces a new concept
AnimatedVisibilityScope
, which I'd love to get feedback on ๐Ÿ™‚ ). Once beta07 is out,
AnimatedContent.kt
(from the link above) should just work for you if you patch it locally. If anyone is interested in playing with it, feedback would be highly appreciated as always. ๐Ÿ™
โค๏ธ 4
s
I think, it's build on top of Changes in Transition API's, which will hopefully realase in Compose beta07. @Doris Liu
yes black 1
c
Would it work with the navgation?
๐Ÿ‘Œ 1
d
Would it work with the navgation?
That's what we are working towards, but it likely won't be done in the linked change. ๐Ÿ™‚
c
@Doris Liu Iโ€™ll look forward to it and thank you for your work anyway ๐Ÿ˜‰
๐Ÿ™‚ 1
m
@Doris Liu I wonder if I'm missing something, if not, there might be something to consider in the design of AnimatedVisibility. Let's assume I have a Row which has two children visible at all times and then two other children under AnimatedVisibility. Those two other children will not have access to RowScope since they are inside AnimatedVisibilityScope. And therefore they are no longer laid out next to each other, but on top of each other like in BoxScope. I'm writing from mobile but if it's too difficult to understand I can prepare a snippet.
d
Are the two children in the same AnimatedVisibility or each in a separate AnimatedVisibility? The latter will lay them out next to each other
m
In the same one. You are right, separating them is a sensible solution :) I just wonder if it's possible to somehow preserve or pass the original scope so that AnimatedVisibility becomes a drop in replacement for an if statement
d
I just wonder if it's possible to somehow preserve or pass the original scope so that AnimatedVisibility becomes a drop in replacement for an if statement
Thanks. That's good feedback. ๐Ÿ™‚ The challenge is that
Row
can also have its own arrangement logic such as
spaceEvenly
that would only work when it has visibility of all the children. By putting the two children in one
AnimatedVisiblity
, Row would only see them as one child. The arrangement therefore will become incorrect. Rather than trying to wrestle
AnimatedVisibility
to work in that case, I think it may make more sense to create something like an
AnimatedRow
, where both persistent items and transient items can be direct children of it. I'll play with that idea some more when I have time. Please feel free to file a feature request in the meantime.
โž• 1
m
Sure thing :)
๐Ÿ™ 1