I created a simple login screen that stacks a login button, the username and password edit boxes vertically from the bottom.
When someone clicks the username/password fields, the virtual keyboard comes up and hids the editbox or button below it. I have seen this in another application that the login button always stays in the visible area.... how can I achieve this?
In your <activity>
element of the AndroidManifest.xml
use android:windowSoftInputMode="adjustResize"
:
<activity android:name=".YourActivity"
android:windowSoftInputMode="adjustResize">
</activity>
Make sure you have wrapped the content of your layout into a ScrollView
, so that it will be easily browsable.
There's a blog post for that: http://android-developers.blogspot.com/2009/04/updating-applications-for-on-screen.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With