Kotlin TextView Scrollable (KTS)

I am displaying text in a TextView that seems too long to fit on one screen. How can I make this one component scrollable?

Solution

Actually you don't need to use ScrollView, but just set the property on TextView like this:

android:scrollbars= "vertical"

Then call the following function in your TextView component via your native code:

yourTextView.setMovementMethod(ScrollingMovementMethod());

Post a Comment

Previous Next

نموذج الاتصال