Android: how to permanently & completely NOT show default soft keyboard for an EditText?

前端 未结 2 848
囚心锁ツ
囚心锁ツ 2021-02-09 16:33

I have three EditText boxes in an activity, for two of which normal input methods (hard keys, default soft keyboard) are ok. But for one of the EditText boxes I want to send sof

2条回答
  •  一生所求
    2021-02-09 17:18

    Simple

    editText.setShowSoftInputOnFocus(false);
    

    Some people suggested that the following might work on older versions of Android, but the behaviour is unexpected.

    edittextPlay.setTextIsSelectable(true);
    

提交回复
热议问题