Reputation: 2480
I have a dialog with an edit text inside. Once I open the keyboard I have two options : 1. resize the layout - and then the edittext is simply gone(visually). 2. pan - the edit text is shown partially and I do see every line I write in it. BUT - the keyboard hides the Button at the bottom of the dialog (beneath the edittext)
I know it's possible in iOS. But is it possible in Android to simply lift the dialog to the top so that only half of it is seen ?
here's a picture to depict what I'm aiming at :
Upvotes: 0
Views: 986
Reputation: 797
For dialog, you need to do it in the dialog.
dialog!!.window!!.setSoftInputMode( WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
Upvotes: 0
Reputation: 8149
Use adjustResize
with adjustPan
android:windowSoftInputMode="adjustPan|adjustResize"
if it looks ugly then use ScrollView
in dailog by using customview.
Upvotes: 0
Reputation: 2533
In your Manifest file add the following code for this particular activity
<activity android:name="yourActivity"
android:windowSoftInputMode="adjustPan" >
</activity>
Check this doc for more info.
EDIT
try these.. may it works for you.
android:windowSoftInputMode="adjustPan|adjustResize"
android:windowSoftInputMode="stateVisible|adjustResize"
Upvotes: 1