I'm trying to put a EditText as not editable with this code:
<EditText android:id="@+id/outputResult"
android:inputType="text"
android:editable="false"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/result" />
I had to add this for not editable
android:focusable="false"
Am I doing something wrong?
Thanks you verry much
I guess I am late but use following together to make it work:
I had this problem, too.
I did this:
If you really want to use an editText and not a textView, then consider using these three:
EDIT: The "longClickable" attribute disables the long press actions that cause the "Paste" and or "Select All" options to show up as a tooltip.
android:editable="false"
android:focusable="false"
android:clickable="false"
its work for me
Add below line in youe xml edittext.
Its working for me
In case you want to make an EditText not editable from code:
In case you want to remove the horizontal line of your EditText, just add:
If you want to let users copy the content of the EditText then use: