Skip to main content
added 259 characters in body
Source Link
Elango
  • 422
  • 3
  • 11

If you have only one TextView inside ScrolView not work, youYou no need to add mutiple Textview till screen exit, then try or use recycerview to add multiple Text dynamicallyScrollBar

follow these https://developer.android.com/reference/android/widget/ScrollViewTry with is

In you ,XML

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" tools:context=".ScrollingActivity"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:scrollbars = "vertical" android:text="@string/large_text"/> </LinearLayout> 

https://www.javatpoint.com/android-scrollview-vertical And in your java

yourtextview.setMovementMethod(new ScrollingMovementMethod()); 

If you have only one TextView inside ScrolView not work, you need to add mutiple Textview till screen exit, then try or use recycerview to add multiple Text dynamically

follow these https://developer.android.com/reference/android/widget/ScrollView ,

https://www.javatpoint.com/android-scrollview-vertical

You no need to use ScrollBar

Try with is

In you XML

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" tools:context=".ScrollingActivity"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:scrollbars = "vertical" android:text="@string/large_text"/> </LinearLayout> 

And in your java

yourtextview.setMovementMethod(new ScrollingMovementMethod()); 
Source Link
Elango
  • 422
  • 3
  • 11

If you have only one TextView inside ScrolView not work, you need to add mutiple Textview till screen exit, then try or use recycerview to add multiple Text dynamically

follow these https://developer.android.com/reference/android/widget/ScrollView ,

https://www.javatpoint.com/android-scrollview-vertical