Just played with `AnimatedVisibility`. Really like how simple the API is and fits really well to a h...
v
Just played with
AnimatedVisibility
. Really like how simple the API is and fits really well to a host of different use cases. Here is what I implemented to demonstrate list deletion with animation. Thanks for your work on this @Doris Liu ๐Ÿ‘๐Ÿผ Here is the code with comments if anyone is interested - https://github.com/vinaygaba/Learn-Jetpack-Compose-By-Example/blob/master/app/src/main/java/com/example/jetpackcompose/animation/ListAnimationActivity.kt#L53
๐Ÿ‘ 7
๐Ÿ˜ 10
๐Ÿ”ฅ 4
h
I was going to try
AnimatedVisibility
to hide TopAppBar when content was scrolled but
LazyColumnFor
still doesn't share its scroll state. Maybe there is another way to achieve the same affect?
d
Yes, scroll delta seems to be a part of the internal state at the moment. Perhaps it's worth filing a feature request to expose some of the scroll info?
l
Does it support different interoplators?
d
Yes, you could specify different interpolations via `AnimationSpec`s for fade/expand/shrink/slide
โž• 1
m
What is the ExperimentalAnimationApi annotation added to composables?
v
Itโ€™s just for code health sake. Similar to the
@Deprecated
annotation, this annotation just notifies the user that itโ€™s still an experimental API and will continue to evolve/change. Itโ€™s mostly for expectation setting.
๐Ÿ‘† 1
โค๏ธ 1
l
Very nice these
AnimatedVisibility
capabilities!