Just played with `AnimatedVisibility`. Really like...
# compose
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!