Rick Regan
03/22/2021, 5:43 PMCrossfade
, but the "thumbs" do not (they abruptly disappear when the animation ends). Is there something I need to do differently to get them to fade as well?Rick Regan
03/22/2021, 5:44 PM@Composable
fun SelectableTextAnimation() {
var text by remember { mutableStateOf("Select some of this text then click 'Clear'")}
Column {
Button(onClick = { text = "" },
) {
Text(text = "Clear")
}
Crossfade(targetState = text, animationSpec = tween(3000)) { currText ->
SelectionContainer {
Text(text = currText)
}
}
}
}
Doris Liu
03/22/2021, 8:42 PMSiyamed
03/22/2021, 10:12 PMSiyamed
03/22/2021, 10:12 PMRick Regan
03/23/2021, 1:08 AMSiyamed
03/23/2021, 1:38 AMRick Regan
03/23/2021, 1:56 AM