Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/212.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为什么我的文本视图在android中滚动?_Android_Textview - Fatal编程技术网

为什么我的文本视图在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行。我需要防止这种情况。