如何使 EditText 字段在属性 inputType 上不可编辑
inputType="textPassword"
我的问题是以下代码行使密码可见。
password.setInputType(InputType.TYPE_NULL);
已尝试关注,但仍可编辑
password.setEnabled(false)
最佳答案
如果你玩:
edittext.setFocusable();
edittext.setFocusableInTouchMode();
您应该能够在需要时使 EditText 可编辑/不可编辑。
关于java - 使 EditText 字段不可编辑,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/9008790/