0

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.

sohaib rahman
  • 283
  • 1
  • 6
  • 15

1 Answers1

2

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>
inazaruk
  • 72,103
  • 23
  • 181
  • 156