有没有一种方法可以允许用户在TextView中选择/复制文本?我需要EditText的相同功能,您可以长按该控件并获得全选/复制的弹出选项,但是我需要该控件看起来像TextView。
尝试了一些操作,例如使EditText使用editable =“ none”选项或inputType =“ none”,但这些操作仍保留了EditText的框架背景,我不希望这样,
谢谢
-------更新----------------------
那里是99%,我想要的是使选择光亮可见(橙色的东西)。除此之外,尽管如此,还是可以忍受的:
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:editable="false"
style="?android:attr/textViewStyle"
android:textColor="@color/white"
android:textAppearance="@android:style/TextAppearance.Medium"
android:cursorVisible="false"
android:background="@null" />
我猜这是由于cursorVisible =“ false”引起的,但即使没有进行任何选择,光标也不会存在。