The trick is to use a RelativeLayout and implement the following button layout properties:
- android:layout_alignParentLeft="true"
- android:layout_alignParentRight="true"
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
android:background="@color/white" >
<Button
android:id="@+id/back_btn"
android:layout_width="100px"
android:layout_height="wrap_content"
android:text="Prev"
android:layout_alignParentLeft="true"
android:padding="10dip"
android:background="@drawable/button"
android:textColor="@color/white" />
<Button
android:id="@+id/forward_btn"
android:layout_width="100px"
android:layout_height="wrap_content"
android:text="Next"
android:layout_alignParentRight="true"
android:background="@drawable/button"
android:textColor="@color/white"
android:padding="10dip" />
</RelativeLayout>