我在我的XML中配置了一個textview,如下所示。android中的不可滾動textview
<RelativeLayout>
<!-- more views here like ImageView and other TextView-->
<TextView
android:id="@+id/message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="4"
android:textIsSelectable="false"
android:autoLink="web|phone|email"/>
</RelativeLayout>
該視圖的內容可能是文本,也可能包含HTML內容。因此我將autoLink設置爲true。問題是,如果autoLink或textIsSelectable爲true,那麼textview的內容超過4行時將開始滾動,類似於(MovementMethod)。我正在尋找一種方法來停止/禁用此文本視圖滾動。
我試圖禁止使用setEnable(假)的文本視圖滾動,然而在TextView的所有環節不能此後點擊。
我認爲必須有實現「非滾動的TextView」可能包含在其中的HTML內容的直接的方式。
您是否找到答案? – Holoceo
您是否找到任何答案? –