Automatic popping up keyboard on start Activity Automatic popping up keyboard on start Activity android android

Automatic popping up keyboard on start Activity


Use this attributes in your layout tag in XML file:

android:focusable="true"android:focusableInTouchMode="true"

As reported by other members in comments it doesn't works on ScrollView therefore you need to add these attributes to the main child of ScrollView.


You can add this to your Android Manifest activity:

android:windowSoftInputMode="stateHidden|adjustResize"


I have several implementations described here, but now i have added into the AndroidManifest.xml for my Activity the property:

android:windowSoftInputMode="stateAlwaysHidden"

I think this is the easy way even if you are using fragments.

"stateAlwaysHidden" The soft keyboard is always hidden when the activity's main window has input focus.