Keep the android view in the visible area if the keyboard appears

I created a simple login screen that folds the login button, user name and password input fields vertically from the bottom.

When someone clicks the username / password fields, a virtual keyboard appears and hides the edit window or the button below it. I saw this in another application that the login button always remains in the visible area ... How can I achieve this?

+6
android
source share
2 answers
+5
source share

In the <activity> element of AndroidManifest.xml use android:windowSoftInputMode="adjustResize" :

 <activity android:name=".YourActivity" android:windowSoftInputMode="adjustResize"> </activity> 

Make sure the contents of your layout are included in ScrollView so that it will be easy to view.

+10
source share

All Articles