Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/218.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中textview上的选择标记_Android_Textview - Fatal编程技术网

android中textview上的选择标记

android中textview上的选择标记,android,textview,Android,Textview,我在textView上使用了textView.setTextIsSelectable(true)或android:textselectable=“true”。它在某处工作,但在某些文本视图上显示以下错误 W/TextView: TextView does not support text selection. Action mode cancelled. 我已经试过了 android:focusable="true" android:focusableInTouchMode=

我在textView上使用了
textView.setTextIsSelectable(true)
android:textselectable=“true”
。它在某处工作,但在某些文本视图上显示以下错误

W/TextView: TextView does not support text selection. Action mode cancelled.
我已经试过了

 android:focusable="true"
        android:focusableInTouchMode="true"
也在文本视图上,但它也不工作,你能帮我弄清楚为什么它在某些文本视图上工作而在其他文本视图上不工作吗

非常感谢advanced。

回答如下:

如果
TextView
,您是否尝试过
TextView.setTextIsSelectable(true)
或者如果
EditText
EditText.setSelectAllOnFocus(true)


希望这对您有所帮助。

请参考链接:-我正在使用textView,并且已经尝试了textView.setTextIsSelectable(true),但它没有做出任何改变。是的,这些文本视图在列表视图中,这会有什么问题吗?这两个文本视图的使用方式有什么不同吗?