Reputation: 18728
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:
android:windowSoftInputMode="adjustResize"
in the manifest.android:fitsSystemWindows="true"
in the layout root.RelativeLayout
vs. LinearLayout
as root.<item name="android:windowFullscreen">false</item>
in it.ScrollView
.Anything left to try?
Upvotes: 4
Views: 2542
Reputation: 591
Put your form inside ScrollView
. So that when keyboard pop-out, your components are able to scroll.
Upvotes: -1
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