3

is there any way to define how far a view is moved up when the soft keyboard appears? In my case i have a Username and a Password EditText close to the bottom of my view, when the user now clicks on the Username field the soft keyboard appears and the View is automatically moved up so that you can see the Username EditText. But then the user is not able to see the Password EditText, which is kindof counter-intuitive. When the user once klicked on the Password Field and then goes back to the Username Field everything looks like i want it to look.

Im am using Android 2.3.3 API Level 10

I did add

android:windowSoftInputMode="adjustPan" 

in my activity since i don't want the view to resize when the keyboard appears.

without keyboard:

View without keyboard

with keyboard and Username focus:

view after click in Username

after click on password - also desired behaviour after click on Username:

view after click in password

Community
  • 1
  • 1
Simon Meyer
  • 1,946
  • 12
  • 23
  • Even though you asked this question a year ago, while I was looking for an answer for a similar question I stumbled on a possible answer for you. Take a look at [this answer](http://stackoverflow.com/questions/2150078/how-to-check-visibility-of-software-keyboard-in-android/4737265#4737265). Also, [this article](http://android-developers.blogspot.co.il/2009/04/updating-applications-for-on-screen.html) might be useful as well. – ChicoDelaBarrio May 06 '14 at 11:26
  • Did you find a solution for this? – null pointer Sep 07 '15 at 05:37
  • Not really. We did some workaround with some global layout listener and watched when the size of the view changed - but i wouldn't consider that a solution. – Simon Meyer Sep 08 '15 at 08:06

0 Answers0