其实这个很简单,只需要使用相对布局就可以.

 

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true" >

<Button
android:id="@+id/btn_back"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="20dp"
android:layout_alignParentBottom="true"
android:background="@drawable/shape_background_btn"
android:text="退出"
android:textColor="#fff"
android:textSize="18sp" />

</RelativeLayout>