How to make EditText not editable through XML in Android?

后端 未结 27 1919
梦谈多话
梦谈多话 2020-11-28 17:35

Can anyone tell me how to make an EditText not editable via XML? I tried setting android:editable to false, but

  1. it is de
27条回答
  •  没有蜡笔的小新
    2020-11-28 18:30

    They made "editable" deprecated but didn't provide a working corresponding one in inputType.

    By the way, does inputType="none" has any effect? Using it or not does not make any difference as far as I see.

    For example, the default editText is said to be single line. But you have to select an inputType for it to be single line. And if you select "none", it is still multiline.

提交回复
热议问题