Sunday, September 18, 2011

Showing Buttons on either side of a layout


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:background="#FFFFFF"
    android:layout_height="fill_parent">
   
    <!-- Header -->
    <RelativeLayout
        android:layout_width="fill_parent"
        android:background="@drawable/top_header"
        android:paddingLeft="5dip"
        android:paddingRight="5dip"
        android:layout_height="50dip">
       
        <Button
            android:layout_width="wrap_content"
            android:background="@drawable/back_btn"
            android:layout_centerVertical="true"
            android:layout_alignParentLeft="true"
            android:layout_height="wrap_content">
        </Button>
       
        <Button
            android:layout_width="wrap_content"
            android:background="@drawable/cancle_btn"
            android:layout_centerVertical="true"
            android:layout_alignParentRight="true"
            android:layout_height="wrap_content">
        </Button>
       
    </RelativeLayout>
   
    <!-- Body -->
     
</LinearLayout>

No comments:

Post a Comment