In this example, the selected text and the highlig...
# compose
r
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?
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)
            }
        }
    }
}
d
The text selection handles are in a different window iirc. @Siyamed
s
Selection handles are popup's (yes different windows)
Currently we do not have direct access to those (selection handles)
r
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 ...
s
sure please create an issue.
r
Thanks (not trying to make more work for you): https://issuetracker.google.com/u/3/issues/183419282