Reputation: 2248
The keyboard pops up wherever there's an EditText item. I wan't to disable this popup from occurring automatically and only want the keyboard to appear when the user manually sets focus on the EditText field. I have added the following in my Manifest file but it doesn't appear to work:
<activity android:name=".AccountActivity" android:label="yourtime" android:windowSoftInputMode="adjustResize|stateHidden"></activity>
Upvotes: 3
Views: 1825
Reputation: 31
You can also set this in the manifest file. For each activity, add the following attribute.
android:windowSoftInputMode="stateHidden"
Upvotes: 0
Reputation: 12627
As I already wrote in the comment use the getWindow() method of your host-activity to set the SOFT_INPUT_STATE_ALWAYS_HIDDEN
flag. There is no need to invoke anything on an EditText when you want to disable the up-popping keyboard generally in this specific activity.
Upvotes: 3