Android Jetpack Compose Animation on Text not working

27 Views Asked by At

I am trying to animate textview with below code but upon testing on emulator, the textview does not animate the way it expected.

Here is my existing code which i am trying on Fragment.

           Column(
                modifier = Modifier.fillMaxSize(),
                verticalArrangement = Arrangement.Center,
                horizontalAlignment = Alignment.CenterHorizontally
            ) {
                AnimatedVisibility(
                    visibleState = textVisibility,
                    enter = fadeIn(animationSpec = tween(3000)) +
                            slideInVertically(
                                animationSpec = tween(3000),
                                initialOffsetY = { (it / 0.5).toInt() }
                            )
                ) {
                    Text(
                        text = "Jetpack Compose",
                        style = MaterialTheme.typography.body1,
                        color = MaterialTheme.colors.textColor
                    )
                }
            }
0

There are 0 best solutions below