Why can I type into a disabled EditText?

后端 未结 8 1625
时光取名叫无心
时光取名叫无心 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:31

    For a more up to date answer check this thread:

    How to replicate android editable false

    0 讨论(0)
  • 2021-01-11 20:33

    Use this, it worked for me

    setFocusableInTouchMode(boolean);
    
    setFocusable(boolean);
    
    0 讨论(0)
提交回复
热议问题