Cannot Change EditText Back To Being Editable
I want to make my EditText not Editable through java code, and then get it back to being editable, but it seems that it cannot be changed back. noteDetailsview.setClickable(false)
Solution 1:
Try with this to make eddittext not editable:
noteDetailsview.setEnabled(false);
and this to make it editable again:
noteDetailsview.setEnabled(true);
Solution 2:
use noteDetailview.setEnable(true/false) to enable/disable the edittext.
Solution 3:
you can use these methods:
public void getFocous(EditText edit) {
edit.setFocusable(true);
edit.setFocusableInTouchMode(true);
edit.requestFocus();
edit.requestFocusFromTouch();
}
public void loseFocous(EditText edit) {
edit.clearFocus();
edit.setFocusable(false);
}
Post a Comment for "Cannot Change EditText Back To Being Editable"