0

How to I show the relative layout in the red area when soft input opened? I tried adjustPan and adjustResize input modes but did not happen. Any ideas?

enter image description here


enter image description here

Oğuzhan Döngül
  • 7,856
  • 4
  • 38
  • 52
A.Y. Kilic
  • 3
  • 1
  • 4

1 Answers1

0

First, add android:windowSoftInputMode="adjustResize" to your activity at manifest.xml.

Then create layout like below.

  • As Parent, use RelativeLayout
  • Put Inside 2 children(ScrollView and Bottom View)
  • Bottom View aligned to bottom.
  • ScrollView located above from Bottom View.

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <ScrollView
        android:layout_above="@+id/bottomView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        //scrollable content
    </ScrollView>

    <RelativeLayout
        android:id="@+id/bottomView"
        android:layout_alignParentBottom="true"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        //your bottom content
    </RelativeLayout >
</RelativeLayout>
Oğuzhan Döngül
  • 7,856
  • 4
  • 38
  • 52