https://kotlinlang.org logo
a

Artem Kopan

09/04/2020, 8:09 PM
Hi everyone, how to make text scrollable?
z

Zach Klippenstein (he/him) [MOD]

09/04/2020, 8:23 PM
Wrap it in a
ScrollableColumn
or
ScrollableRow
or both.
a

Adam Powell

09/04/2020, 9:46 PM
I think we have a scrollable modifier for arbitrary elements now too (or if not we will soon!)
a

Artem Kopan

09/05/2020, 10:11 AM
@Adam Powell Thanks, it works. However, how to show scrollbar ?
Copy code
Text(text = "text",
    modifier = Modifier
        .verticalScroll(rememberScrollState())
)
a

Adam Powell

09/05/2020, 2:27 PM
Today, hold the scroll state in a val and write another modifier that draws an associated scroll bar given the scroll state as input. We'll probably have a few of these available later.
3 Views