2

I have an android dialog with EditText in it.

When the user clicks the EditText, the keyboard is opened

but the dialog is shrink.

The dialog root background is a 9patch

I want it to be cut, meaning its corners won't be rounded but square.

Now, the user might think the shrink dialog is the dialog full size.

I want the keyboard to be laid on the dialog in a way the user will see the dialog is originally larger there are not visible fields.

enter image description here

I have tried this on the activity that opens the dialog:

      mDialog.getWindow().setSoftInputMode(
WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);

manifest:

android:windowSoftInputMode="adjustPan" 
Elad Benda
  • 35,076
  • 87
  • 265
  • 471
  • what does *I wan it to be cut, meaning it corners won't be rounded but square.* mean? – Blackbelt Mar 30 '14 at 07:43
  • Is your view behind a ScrollView? – gilonm Mar 30 '14 at 07:46
  • I want it to be cut, meaning its corners won't be rounded but square. Now, the user might think the shrink dialog is the dialog full size. I want the keyboard to be laid on the dialog in a way the user will see the dialog is originally larger there are not visible fields. – Elad Benda Mar 30 '14 at 07:46
  • @Elad Benda Can you post your Dialog design layout xml/code? – Yuvaraja Apr 04 '14 at 10:48
  • I think your problem fixed [here](http://stackoverflow.com/a/17410528/2677801) – mehmet Apr 05 '14 at 06:40

1 Answers1

1

See my similar answer here: https://stackoverflow.com/a/22463549/335650

Is any part of your layout a scrollable container (like ListView)? If so, try setting android:isScrollContainer="false" on that item in your XML layout.

If you have any views which have android:isScrollContainer="true", the layout manager will attempt to resize your layout when the keyboard pops up, regardless of `android:windowSoftInputMode'.

Community
  • 1
  • 1
Josh
  • 10,618
  • 2
  • 32
  • 36