1

I am having an activity in fragment where there is an editbox and 3 buttons below the editbox. Please see attachment. When this activity is launched, the default state is STATE1.(Please see image). Now when the user types on the editText and when the keyboard is shown the buttons in STATE1 disappears and goes to STATE2.

but I want when the keyboard appear it sould go to STATE3 and not STATE2

I am not sure how to accomplish this. I have the height of the edittext hardcoded to some dp based on the target device. I believe this has to be changed. Can anyone help me in how to accomplish this. enter image description here

enter image description here

Jai
  • 3,211
  • 2
  • 17
  • 26

1 Answers1

1

Try this in manifest:

    <activity
        android:name=".activity.YourActivity"
        android:label="@string/app_name"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="adjustResize|stateHidden" />

Instead of adjustResize you can also try adjustPan.

Hope this helps.

Sarthak Gandhi
  • 2,130
  • 1
  • 16
  • 23