简体   繁体   中英

LinkMovementMethod not scrolling TextView

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?

我能够通过在一个滚动视图中包装textview来完成这项工作,如本文所选答案中所述, 使TextView可在Android上滚动

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM