Question Detail

How to disable Edittext for Enter Value android?

6 years ago Views 1312 Visit Post Reply

I have Edittext it is editable as default but I want to set value but not give permission to the user to edit it again How can i unable to edit in Android?


Thread Reply

Bili Greed

- 6 years ago

You need to use only set focusable FALSE
Programically 

editText.setFocusable(false);


In XML

android:focusable="false"

Anonymous

- 6 years ago

Editable false or you can set focus false so the user will not able to edit it or if you set the focus false than also the same thing will happen. Both can be done in your xml file.