问题
Just like in texting applications, I want the keyboard to push the dialog box up when it raises. The issue I'm currently having is that the keyboard actually raises over my dialog box and the screen does not scroll.
Here's what I want: (Don't have enough reputation to post images)
Image one (Before)
Image two (After)
See how nicely it raises? How do I go about doing that?
回答1:
Use a RelativeLayout
and place your EditText
using android:layout_alignParentBottom="true"
it should then raise automatically when the keyboard is shown.
回答2:
//try windowsoftinput mode in your manifest xml file.
android:windowSoftInputMode="adjustResize"
adjustResize 0x10 Always resize the window: the content area of the window is reduced to make room for the soft input area
.
ref this
来源:https://stackoverflow.com/questions/8911714/how-do-i-make-an-edittext-raise-along-with-the-keyboard-when-in-focus