Search code examples
androidandroid-edittext

How to set editable true/false EditText in Android programmatically?


We can set editable property of EditText in XML layout but not programatically, but there is no setEditable() method!

If EditText is not Enabled [ by setEnabled(false)] it still Editable!


Solution

  • I did it in a easier way , setEditable and setFocusable false. but you should check this.

    How to replicate android:editable="false" in code?