Android Jetpack Создание анимации для текста не работает ⇐ Android
-
Anonymous
Android Jetpack Создание анимации для текста не работает
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 ) } }
Источник: https://stackoverflow.com/questions/781 ... ot-working
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 ) } }
Источник: https://stackoverflow.com/questions/781 ... ot-working
Мобильная версия