How to disable EditText in Android
you can use EditText.setFocusable(false)
to disable editingEditText.setFocusableInTouchMode(true)
to enable editing;
In code:
editText.setEnabled(false);
Or, in XML:
android:editable="false"
I think its a bug in android..It can be fixed by adding this patch :)
Check these links
question 1
and
question 2
Hope it will be useful.
Assuming editText
is you EditText
object:
editText.setEnabled(false);