How to Prevent Keyboard appearing for EditText that is not enabled

前端 未结 6 803

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:50

    To make EditText Write Only and not have the keyboard show up I use these two commends within the .xml layout file.

            android:editable="false"
            android:inputType="none"
    

提交回复
热议问题