为什么我的文本视图在android中滚动?
为什么我的文本视图会滚动为什么我的文本视图在android中滚动?,android,textview,Android,Textview,为什么我的文本视图会滚动 <TextView android:id="@+id/content" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/rl_logo_header" a
<TextView
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/rl_logo_header"
android:layout_marginTop="5dp"
android:autoLink="web"
android:descendantFocusability="blocksDescendants"
android:ellipsize="end"
android:focusable="false"
android:maxLines="3"
android:text="Should my school be focused on -- Teaching and Learning come as words which are very closely related, But they convey very different meanings and can not be used interchangeably."
android:textColor="@color/black" />
此视图的内容可以是文本,也可以包含HTML内容。因此,我将autoLink
设置为true
。问题是,如果自动链接
或文本可选择
为真
,则当文本视图的内容超过3行时,文本视图将开始类似(移动方法
)的滚动。我正在寻找一种方法来停止/禁用此文本视图滚动
我尝试使用文本视图的setEnable(false)
禁用滚动,但是此后无法单击文本视图中的所有链接
我认为必须有一种直截了当的方法来实现“不可滚动的文本视图”,其中可能包含html内容。
autoLink
控制textview
是否会解析URL并突出显示URL。它与呈现HTML无关
您的
TextView
正在滚动,因为您已将android:maxLines=“3”
设置为滚动超过3行。我需要防止这种情况。