In this example, the selected text and the highlighting fades with the
Crossfade
, 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
Copy code
@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)
}
}
}
}
The text selection handles are in a different window iirc. @Siyamed
s
Siyamed
03/22/2021, 10:12 PM
Selection handles are popup's (yes different windows)
Siyamed
03/22/2021, 10:12 PM
Currently we do not have direct access to those (selection handles)
r
Rick Regan
03/23/2021, 1:08 AM
Unless you object, I'm inclined to write an issue, becauseĀ as a user, the handles and the highlighting are part of the same thing. You may not be able to fix it but ...