I would like to have a fixed footer something like this:
I tried to achieve this using relative layout:
<RelativeLayout
android:id="@+id/footer"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/_12sdp"
android:layout_alignParentBottom="true">
<TextView
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_gravity="center_horizontal"
android:textColor="@color/material_grey_850"
android:gravity="center_horizontal"
android:text="Version 1.0 Demo"
android:layout_marginTop="@dimen/_22sdp"
android:textSize="@dimen/_15sdp"
android:id="@+id/versionText" />
<TextView
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_gravity="center_horizontal"
android:textColor="@color/material_grey_850"
android:gravity="center_horizontal"
android:text="Copyright (c) 2017 Aglive Pty Ltd"
android:layout_marginTop="@dimen/_8sdp"
android:textSize="@dimen/_15sdp"
android:id="@+id/copyrightText"
android:layout_alignParentBottom="false"
android:layout_below="@id/versionText" />
<RelativeLayout
android:orientation="vertical"
android:layout_column="0"
android:layout_row="2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_columnSpan="7"
android:layout_marginTop="7.0dp"
android:layout_marginBottom="7.0dp"
android:id="@+id/relative"
android:layout_below="@id/copyrightText">
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="center_horizontal"
android:textColor="@color/material_grey_850"
android:gravity="center_horizontal"
android:text="Terms of Service"
android:layout_marginTop="21.5sp"
android:layout_alignParentBottom="true"
android:textSize="@dimen/_15sdp"
android:layout_marginRight="5.5sp"
android:id="@+id/termsOfService"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/_15sdp" />
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="center_horizontal"
android:textColor="@color/material_grey_850"
android:gravity="center_horizontal"
android:text="Contact Us"
android:layout_marginTop="21.5sp"
android:layout_alignParentBottom="true"
android:textSize="@dimen/_15sdp"
android:layout_marginRight="@dimen/_15sdp"
android:id="@+id/contactUs"
android:layout_alignParentRight="true" />
</RelativeLayout>
</RelativeLayout>
But the problem here is that whenever the keyboard opens up the footer moves up. For which I tried to add WindowSoftInputMode = SoftInput.AdjustPan
. It worked for the keyboard issue but whenever the screen rotates to landscape mode the footer overlaps the other text. Also my relative layout does not come as required. The relative layout seems to be covering other text.