4

I have a TextView with clickable spannablestrings. I am calling

textview.setMovementMethod(LinkMovementMethod.getInstance());

I am able to click individual words but the TextView does not scroll. This is the TextView XML.

<TextView
android:id="@+id/tvText"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:paddingTop="0dp"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:textColor="#000000"
android:textSize="20sp"
android:lineSpacingExtra="5dp"
android:scrollbars="vertical"
android:maxLines="12"
/>

Since LinkMovementMethod extends ScrollingMovementMethod, it seems that it should also scroll. What am I missing?

Matt Robertson
  • 2,283
  • 5
  • 23
  • 51

1 Answers1

0

I was able to make this work by wrapping textview in a scrollview as described in the selected answer on this post Making TextView scrollable on Android.

Community
  • 1
  • 1
Matt Robertson
  • 2,283
  • 5
  • 23
  • 51