5

I'm using ActionBarSherlock. windowSoftInputMode is adjustPan (I've tried with adjustResize and adjustNothing also).

I want to keep ActionBar on screen when keyboard appears but slide my layout instead (so text remains visible).

Here is how it looks right: enter image description here

And when keyboard is appeared: enter image description here

Question is: how can I keep ActionBar visible while using adjustPan (so EditTexts will always be visible)?

NOTE I can't use ScrollView to hold my View

Dmitry Zaytsev
  • 23,650
  • 14
  • 92
  • 146

2 Answers2

2

I find out, that there may be problems with adjustResize (for some reason it's just uses adjustPan instead) when you applying FLAG_FULLSCREEN to Window of Activity:

getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
            WindowManager.LayoutParams.FLAG_FULLSCREEN);

Without this line resizing working just fine.

Dmitry Zaytsev
  • 23,650
  • 14
  • 92
  • 146
  • 1
    Hi, Im facing the same problem, how it should be used? I didnt get :) – Lara Sep 17 '14 at 13:30
  • that was really painfull line of code.Wasted my couple of hours.Without this line resizing works fine – Erum Oct 05 '17 at 06:25
0

it looks like the layout slides up to make some space for the keyborad try:

add this to your manifest.xml:

<activity android:name=".YourActivity" android:label="@string/app_name" android:configChanges="keyboardHidden|orientation|keyboard" />

the important part is: android:configChanges="keyboardHidden|orientation|keyboard"

android documentation manifest.xml

aichingm
  • 738
  • 2
  • 7
  • 15