Tuesday, October 21, 2014

How to create a bottom bar in android




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

<-- <ListView
android:id="@+id/listview1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/bottombar"
android:fastScrollEnabled="true" >
</ListView> -->



<LinearLayout
android:id="@+id/bottombar"
style="?android:buttonBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:divider="?android:dividerVertical"
android:dividerPadding="8dp"
android:gravity="center_horizontal"
android:showDividers="middle" >

<Button
android:id="@+id/events_list_view_organizing_button"
style="?android:buttonBarButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:onClick="onClick"
android:text="Cancel" >
</Button>

<Button
android:id="@+id/events_list_view_attending_button"
style="?android:buttonBarButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:onClick="onClick"
android:text="Done" >
</Button>
</LinearLayout>

</RelativeLayout>

ScreenShot



No comments:

Post a Comment