Vic Vuci
Vic Vuci

Reputation: 7051

How do I make an EditText raise along with the keyboard when in focus?

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?

Upvotes: 3

Views: 2233

Answers (2)

Padma Kumar
Padma Kumar

Reputation: 20041

//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

Upvotes: 2

tidbeck
tidbeck

Reputation: 2388

Use a RelativeLayout and place your EditText using android:layout_alignParentBottom="true" it should then raise automatically when the keyboard is shown.

Upvotes: 4

Related Questions