Colton Idle

    Colton Idle

    1 year ago
    How you get that animation from top to bottom?
    This specifically. Where it comes up?
    Bryan L

    Bryan L

    1 year ago
    Looks like
    AnimatedVisibility
    (docs) really cool & smooth! I like it 🙂
    Rodri Represa

    Rodri Represa

    1 year ago
    Exactly! I use these params
    AnimatedVisibility(
            visible = bottomBarState.subCategoriesVisibility,
            enter = slideInVertically(
                // Slide in from 40 dp from the top.
                initialOffsetY = { with(density) { 40.dp.roundToPx() } },
                animationSpec = tween(durationMillis = 300, easing = LinearEasing)
            ) + fadeIn(
                // Fade in with the initial alpha of 0.3f.
                initialAlpha = 0.3f
            ),
            exit = slideOutVertically(
                targetOffsetY = { with(density) { 40.dp.roundToPx() } },
                animationSpec = tween(durationMillis = 300, easing = LinearEasing)
    
            ) + fadeOut(
                animationSpec = tween(durationMillis = 300, easing = LinearEasing)
            )
        ) {
           ...
    }