0

Scrollbar is showing but not working or scrolling as shown in image below

TextView with Scrollbar

XML:

<TextView android:id="@+id/text_view_dialog_notes" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="7dp" android:layout_marginRight="7dp" android:hint="@string/rv_notes_content" android:padding="5dp" android:scrollbars="vertical" android:minLines="10" android:maxLines="10" android:textSize="17sp" /> 

Where is something wrong and how to fix it?

0

2 Answers 2

3

Using scrollbar on textView

you have to add this line in java

textView.setMovementMethod(new ScrollingMovementMethod()); 
Sign up to request clarification or add additional context in comments.

Comments

1

make sure you add that to your code:

yourTextView.setMovementMethod(new ScrollingMovementMethod()); 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.