0

I have an activity, which should react on keyboard opening, so in the manifest, it has an attribute

 android:windowSoftInputMode="adjustResize"

Also, this activity can start a dialog, which has EditText. When it starts dialog, keyboard is shown, dialog (which is ok) and activity (not ok) are pushed up. It looks ugly and I want disable pushing of the activity up when dialog is visible.

Is there any beautiful way to solve this problem? Currently I am changing softInputModeat runtime, it works but it's annoying.

Also why the hell scrollview scroll not working with adjustPan?

Ümañg ßürmån
  • 9,695
  • 4
  • 24
  • 41
Ololoking
  • 1,577
  • 4
  • 22
  • 37

3 Answers3

1

Try using adjustPan instead of adjustResize.

Ümañg ßürmån
  • 9,695
  • 4
  • 24
  • 41
SinaMN75
  • 6,742
  • 5
  • 28
  • 56
0

Solution:

Firstly,

remove android:windowSoftInputMode="adjustResize" do not even change it from runtime.

Secondly, use <NestedScrollView> and add an attribute to it called:

isScrollContainer="true"

Try it and update here if it is exactly how you need.

Ümañg ßürmån
  • 9,695
  • 4
  • 24
  • 41
0

use this in your activity tag on manifest:

    android:configChanges="orientation|screenSize"
    android:windowSoftInputMode="stateHidden|adjustPan"
Erselan Khan
  • 692
  • 6
  • 13