cavallo cavallo - 1 month ago 19
Android Question

How to move the layout up when the soft keyboard is shown android

I have a login screen with two

EditTexts
and a login button in my layout. The problem is that, when I start typing, the soft keyboard is shown and covers the login button. How can I push the layout up or above the keyboard when it appears?

I do not want to use a
ScrollView
, just want to implement it without scrolling down. Please, suggest me some way of doing it. Thanks in advance.

Answer

i somehow achieved this by knowing the status of the soft keyboard on the device. i move the layout to y position when the keyboard is shown and moved back to its original position when not shown. this works fine, followed the guidelines from http://stackoverflow.com/a/4737265/1063861