Prevent EditText from opening a keyboard when I enter the layout

1

Whenever I enter a layout that has a EditText , it opens by default the digital keyboard for me to write something. I would like to prevent this, I wanted it to display the keyboard only when I clicked on EditText .

    
asked by anonymous 18.03.2016 / 15:45

1 answer

2

You can add one of the following to the declaration of your Activity in Manifest:

To always enter the hidden keyboard

android:windowSoftInputMode="stateHidden"

To leave as is (that is, if the keyboard was already open when it arrived in it, it is still open, if it was not, it is still closed):

android:windowSoftInputMode="stateUnchanged"

Review which option is most appropriate for you and choose.

    
18.03.2016 / 16:39