Magnus
Magnus

Reputation: 18728

Activity isn't resizing when keyboard is shown

I have a simple activity that displays a big multiline EditText and some other controls below it. I want the activity to resize so the buttons are not hidden by the keyboard when the user is typing in the EditText.

I have tried all sorts of sketchy and non-sketchy solutions I have found online - nothing works.

Here's what I've tried so far:

Anything left to try?

Upvotes: 4

Views: 2542

Answers (2)

Zarul Izham
Zarul Izham

Reputation: 591

Put your form inside ScrollView. So that when keyboard pop-out, your components are able to scroll.

Upvotes: -1

Don Chakkappan
Don Chakkappan

Reputation: 7560

Put the following lines in your onCreate()

getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);

Then your Activity will automatically push up/down when , Key Board shown/hide in screen.

Setting up with , Manifest file , didn't work for me.

Upvotes: 6

Related Questions