How to make a manually scrollable marquee (by touch or mouse/touchpad scroll) in Jetpack Compose?

Viewed 495

I often want to quickly read all of a long text like a long song name in YouTube music without waiting for the slow auto-marquee, or a long text/title ellipsized in a list.

Until this arrives, I'd like to know how I could give that UX improvement with Jetpack Compose on Android (though I'm also interested in other platforms).

Thanks in advance for the help!

1 Answers

I think that you can use a ScrollableRow to scroll your text horizontally

@Composable
fun ScrollableRowDemo() {
    ScrollableRow(children = {
        Row {
            Text(
                text = "This is my long long long long long text that I want to scroll horizontally",
                style = (MaterialTheme.typography).body1
            )
        }
    })
}
Related