I created a relative layout with 3 lists. At the top, I have an editText field. In the middle there is a scrollview that fills all the remaining space. Below I put a button. The fact is that when I make an entry in the editText field, the keyboard appears, and then the button moves and fits on the keyboard. The button seems to always stick to the bottom of the view, which is βleftβ, but I want it to stay at the bottom of the original window.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <LinearLayout android:id="@+id/ll_name" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true" > <TextView android:id="@+id/tv_course_name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/text_view_course_name" android:textStyle="bold" /> <EditText android:id="@+id/et_course_name" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:ems="10" /> </LinearLayout> <LinearLayout android:id="@+id/ll_save_course_button" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" > <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:onClick="saveCourse" android:text="@string/button_save_course" /> </LinearLayout> <LinearLayout android:id="@+id/ll_course_table" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_above="@id/ll_save_course_button" android:layout_below="@id/ll_name" > </LinearLayout> </RelativeLayout>
source share