How to Prevent Keyboard appearing for EditText that is not enabled

前端 未结 6 785

My activity has an EditText which is supposedly not editable until user clicks on edit button for the screen.

I did edit.setEnabled(false)

6条回答
  •  粉色の甜心
    2021-01-05 16:27

    Try setEditable(false) on your EditText.

    Set it back to true when you want someone to be able to type in it.

提交回复
热议问题