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

Diego Marulanda

06/03/2020, 2:19 AM
Hi, could someone help me out by telling me, how I could create a declarative (without modifying xml) image slide in Jetpack Compose? I would appreciate it🙆‍♂️
z

Zach Klippenstein (he/him) [MOD]

06/03/2020, 4:25 AM
Do you mean a slide animation?
d

Diego Marulanda

06/03/2020, 6:05 PM
yes
z

Zach Klippenstein (he/him) [MOD]

06/03/2020, 6:08 PM
There’s an
Image
composable for images, and there’s a bunch of animation APIs. The easiest way is probably to use
animatedFloat()
with
Modifier.offset()
.
d

Diego Marulanda

06/03/2020, 6:13 PM
I can load an
Image
with image url?
z

Zach Klippenstein (he/him) [MOD]

06/03/2020, 6:43 PM
d

Diego Marulanda

06/03/2020, 6:53 PM
thanks a lot