*[*:white_check_mark: SOLVED] :sparkles: Animation...
# compose
t
[ SOLVED] Animation:
expandHorizontally
and
shrinkHorizontally
accept a param named
expandFrom
and
shrinkTowards
respectively. But it looks like it doesn’t consider that param. OR am I doing anything wrong? More details inside 🧵
Here’s my code
Copy code
@Composable
fun ExpandInShrinkOutHorizontallyDemo(isVisible: Boolean) {
    AnimatedVisibility(
        visible = isVisible,
        enter = expandHorizontally(
            expandFrom = Alignment.End
        ),
        exit = shrinkHorizontally(
            shrinkTowards = Alignment.CenterHorizontally
        )
    ) {
        Square()
    }
}
Got the problem 🤦‍♂️ Can see the difference with an image rather than a single colored
Square
! TIL: Don’t use colors when experimenting with animations. Instead use an image 😬
👍 1
h
@theapache64 or you can always use box in a box, gradient, and etc. Something obvious to track with your eyes during fast animations. Also, slowing the animation can help 😄
t
Yeah, that’d also work 😄
s
@theapache64 have you eer tried with box and it worked for you?
t
@Sam Marz I don’t know If I understood ur question, but my
Square
was a box, and yeah, it was working but my eyes couldn’t track it 😄
1