How to prevent virtual keyboard from moving and resizing views

959 views
Skip to first unread message

Hayden

unread,
Apr 7, 2010, 5:39:59 PM4/7/10
to Android Developers
Is there a way to prevent the virtual keyboard from moving and
resizing views? I have a table with a row of 4 buttons at the bottom
of a relative layout that are centered and equally sized, very similar
to the 3 buttons that appear at the bottom of the Gmail app when an
email is checked. When the virtual keyboard appears, the buttons move
to stay just above the virtual keyboard. When this happens, the four
buttons become small and get squished to the left, leaving tons of
blank space to the right of the buttons. Is there a property I can set
on the table, row, and/or buttons to prevent this from happening?

Thanks!

Hayden

unread,
Apr 7, 2010, 6:15:32 PM4/7/10
to Android Developers
After playing around off and on with this issue for a few months, I
finally found the answer if anyone else has this problem: I set
android:layout_weight="1" for the table, table row, and all the
buttons

jamesc

unread,
Apr 8, 2010, 1:59:12 AM4/8/10
to Android Developers
Have a read of this:


http://developer.android.com/resources/articles/on-screen-inputs.html

Specifically, mentions of adjustResize and adjustPan.

Reply all
Reply to author
Forward
0 new messages