0

I have created a login page. If I insert some text in edit text (username, password) etc then a softkeyboard is visible. but it comes on my password field view. So upper half of password field is visible while lower half is not because of that softkeyboard. I want when the softkeyboard is visible the password field to move up a little, so that the entire edittext will be visible.

Thanks

DonGru
  • 13,258
  • 8
  • 43
  • 55
Sunil Kumar Sahoo
  • 51,611
  • 53
  • 174
  • 242

3 Answers3

2

add this line in your menifest.xml file

<activity android:name=".your_activity" android:windowSoftInputMode="adjustResize"></activity>
Niranj Patel
  • 36,011
  • 11
  • 98
  • 132
0

Your layout should shift up automatically when it has focus and the softkeyboard is displaying. I have a login form and I've done nothing special to get this behaviour.

C0deAttack
  • 24,123
  • 18
  • 70
  • 81
0

One way you can solve this is by having a ScrollView as the root of your layout.

Joru
  • 4,293
  • 1
  • 18
  • 13