I'm trying to creat a simple activity with an EditText at the top and a Button at the bottom. This last should be above the keyboard when it is open, but I don't get any good result (it stay on the bottom, hidden by the keyboard).
I found lot of subjects on this, so I tryed :
- android:windowSoftInputMode="adjustResize" (also with adjustPan)
- android:fitsSystemWindows="true"
- a scrollview
but that do not helped.
there is my xml:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/search_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff"
android:fitsSystemWindows="true">
<fr.bowo.app.widget.page.EditTextPreIme
android:id="@+id/edit_text_dialog"
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_marginTop="100dp"
android:gravity="center"
android:hint="Rechercher par mot..."
android:imeOptions="actionSearch"
android:inputType="textAutoCorrect"
android:lines="1"
android:maxLines="1"
android:textAppearance="@style/BoldFont"
android:textColor="@color/black"
android:textSize="@dimen/title" />
<Button
android:id="@+id/search_image"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_marginBottom="@dimen/border_small"
android:layout_marginEnd="@dimen/border_small" />
</RelativeLayout>
Thanks for your help.
Use the layout below.
And manifest entry of your activity should be.
Use this layout will solve your issue.