Making TextView scrollable on Android you need to use a android:scrollbars properties of your TextView in your layout’s XML file. Then use the below code in the Activity file. This method will enable scrolling on TextView. Kotlin
1 |
text_v1.setMovementMethod(ScrollingMovementMethod()) |
Java
1 2 |
TextView textView = (TextView) findViewById(R.id.text_view); textView.setMovementMethod(new ScrollingMovementMethod()); |
ScrollView is needed when you want to show too long text and should fit into one screen. Read More…