android中textview上的选择标记
我在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.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),但它没有做出任何改变。是的,这些文本视图在列表视图中,这会有什么问题吗?这两个文本视图的使用方式有什么不同吗?