sohaib rahman
sohaib rahman

Reputation: 301

how to display a keyboard automatically

When an activity is started, the keyboard should automatically get displayed without click of the edittext. I know that when we click the edittext, the keyboard is displayed. But I want that the keyboard should automatically get displayed. How to do this? Please reply.

Upvotes: 1

Views: 555

Answers (1)

inazaruk
inazaruk

Reputation: 74780

You should consider adding android:windowSoftInputMode="stateAlwaysVisible" to your activity xml tag in AndroidManifest.xml. More details can be found in documentation.

<manifest ...>
    ...
    <application ...>
        <activity android:windowSoftInputMode="stateAlwaysVisible" ... />
    </application>
    ...    
</manifest>

Upvotes: 2

Related Questions