Thursday 1 December 2011

attaching buttons at bottom


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:id="@+id/mainlayout"
android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<TextView android:id="@+id/heading" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="ImageGallery"
android:textSize="29dp" android:layout_alignParentTop="true">
</TextView>

<LinearLayout android:id="@+id/bottomlayout"
android:layout_alignParentBottom="true" android:gravity="bottom"
android:layout_gravity="bottom" android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Button android:id="@+id/leftbutton" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="Button"
android:background="@drawable/photogalleryact">
</Button>
<Button android:id="@+id/rightbutton" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="Button"
android:background="@drawable/videogallery">
</Button>
</LinearLayout>
<ListView android:id="@+id/listview" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_gravity="center"
android:layout_above="@+id/bottomlayout" android:layout_below="@+id/heading">
</ListView>
</RelativeLayout>

No comments:

Post a Comment