使用相对布局
<?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:orientation="vertical" >
<ImageButton
android:id="@+id/ibdGoBack"
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:background="@drawable/back_button"
android:contentDescription="@string/backbutton" />
</RelativeLayout>
或者这样的线性布局
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="bottom|right">
<ImageButton
android:id="@+id/ibdGoBack"
android:layout_width="42dp"
android:layout_height="42dp"
android:background="@drawable/back_button"
android:contentDescription="@string/backbutton" />
</LinearLayout>