Chachako
05/17/2021, 6:24 AMDoris Liu
05/17/2021, 7:48 AMTransition<*>.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. ๐Shakil Karim
05/17/2021, 7:48 AMChachako
05/17/2021, 8:21 AMDoris Liu
05/17/2021, 5:48 PMWould it work with the navgation?That's what we are working towards, but it likely won't be done in the linked change. ๐
Chachako
05/19/2021, 1:05 PMMichal Klimczak
06/15/2021, 4:39 PMDoris Liu
06/15/2021, 5:37 PMMichal Klimczak
06/15/2021, 5:42 PMDoris Liu
06/15/2021, 6:09 PMI 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 statementThanks. 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.Michal Klimczak
06/15/2021, 6:22 PMMichal Klimczak
06/17/2021, 3:05 PM