Android studio editText在可选择时变为不可编辑

时间:2017-11-10 13:31:16

标签: android android-edittext edit clickable jquery-ui-selectable

我有一个EditText,我希望它可以编辑和选择,就像任何其他EditText一样。我的主题是

...Light.NoActionBar

所以当选择文本时,我需要一个额外的ActionBar用于复制/粘贴等。 所以我用

editText.setTextIsSelectable()

并且它可以工作,但是当我启用它时,textView变得无法使用! 为了使其再次可编辑,我使用以下

    editText.setFocusableInTouchMode(true);
    editText.setFocusable(true);
    editText.setClickable(true);
    editText.setLongClickable(true);

但它没有帮助!此外,无论我是在.xml中还是在代码中分配这些标签,都没有区别,我试过......

我想这个解决方案非常简单,但API文档和谷歌并没有告诉我如何让它再次编辑......似乎没有人遇到过这个问题

编辑:

的xml:

<EditText
android:id="@+id/etMitspieler"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="8dp"
android:ems="10"
android:hint="Players"
android:inputType="textPersonName"
android:text="test"
android:textColor="@android:color/background_light"
some constraint stuff... />

0 个答案:

没有答案