Why can I type into a disabled EditText?

后端 未结 8 1631
时光取名叫无心
时光取名叫无心 2021-01-11 19:52

If I disable an EditText widget using

editText.setEnabled(false);

I can still type into it using the on-screen input method (in

8条回答
  •  别那么骄傲
    2021-01-11 20:12

    I think you should be able to editText.setOnClickListener() with your own function and call super.onClickListener() if you want your text edited.

    Edit:
    Following link has some answers which sound more like the right way:
    Can we have uneditable text in edittext

提交回复
热议问题