Yossi Zloof
Yossi Zloof

Reputation: 1649

How to set keyboard always display on screen?

I'm trying to make a page in Android, that the keyboard is always display, even when the user is pressing the back button (in that case I would like the app to go back to the last page).
For example: The page that Facebook did when you are writing a post in there app.

Thanks!

Upvotes: 0

Views: 1724

Answers (1)

K_Anas
K_Anas

Reputation: 31466

Add android:windowSoftInputMode="stateAlwaysVisible" to your activity in the AndroidManifest.xml file:

<activity android:name=".MainActivity"
android:label="@string/app_name"
android:windowSoftInputMode="stateAlwaysVisible" />

Upvotes: 1

Related Questions