Issue
I have created an EditTextView
in Android Studio. I would like to disable the possibilty to edit the pre-existing text while enabling the user to select and copy the text inside.
Before, it was possible to do it with:
android:editable="false"
Now however, this is deprecated and it doesn't work anymore. I tried to use:
android:inputType="none"
or
android:focusable="false"
This surely makes the text non-editable but there is no way for the user to select and copy it then.
Is there another way to do that ?
Solution
Just add
editText.setTextIsSelectable(true);
Answered By - Florent Samon
Answer Checked By - Clifford M. (JavaFixing Volunteer)