-1

I want to scroll up the entair screen up when keyboard opened like below.How to do that?

https://www.screencast.com/t/34JwVngLdYbU

m.v.n.kalyani
  • 730
  • 7
  • 20

3 Answers3

0

Apply android:windowSoftInputMode="adjustPan|adjustResize" with activity tag in manifest file.

Garg's
  • 2,526
  • 1
  • 31
  • 44
Vaibhavi
  • 61
  • 8
0
android:windowSoftInputMode="adjustPan|adjustResize"

and put complete layout in LinearLayout and ScrollView & define

layout_height="0dp"
layout_weight="1"

Note: No view have parameter layout_height="match_parent"

KKSINGLA
  • 1,101
  • 2
  • 9
  • 20
0

I had also same issue just adding a single line to my AndroidManifest file's activity.

<activity
        android:name=".activities.YOURACTIVITY"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme.NoActionBar"
        android:windowSoftInputMode="adjustResize|stateVisible"/>

If you want keyboard should appear with start Activity then use stateVisible otherwise use stateHidden.

Here the most important value is the adjustResize. This will shift the whole UI up to give room for the softkeyboard.

Garg's
  • 2,526
  • 1
  • 31
  • 44