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

Vinay Gaba

08/22/2020, 8:08 PM
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

Halil Ozercan

08/22/2020, 9:46 PM
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

Doris Liu

08/22/2020, 11:03 PM
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

louiscad

08/22/2020, 11:23 PM
Does it support different interoplators?
d

Doris Liu

08/22/2020, 11:29 PM
Yes, you could specify different interpolations via `AnimationSpec`s for fade/expand/shrink/slide
1
m

Mehdi Haghgoo

08/23/2020, 3:00 AM
What is the ExperimentalAnimationApi annotation added to composables?
v

Vinay Gaba

08/23/2020, 4:29 AM
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

louiscad

08/23/2020, 9:11 AM
Very nice these
AnimatedVisibility
capabilities!
3 Views