I wounder how it's possible to create a buttom bar buttons in androind,
I read something about this UI solution, are there any controls that can be used?
I wounder how it's possible to create a buttom bar buttons in androind,
I read something about this UI solution, are there any controls that can be used?
You can do something like this inside a relative layout
<LinearLayout android:id="@+id/footer" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:orientation="horizontal"
android:layout_alignParentBottom="true" style="@android:style/ButtonBar">
<Button android:id="@+id/saveButton" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_weight="1"
android:text="@string/menu_done" />
<Button android:id="@+id/cancelButton" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_weight="1"
android:text="@string/menu_cancel" />
</LinearLayout>
You can use a FrameLayout to put something in the bottom by:
android:layout_gravity="bottom|center"
For example:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ListView
android:id="@+id/list1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
<Button
android:id="@+id/btn_"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center"
android:text="OK"
/>
</FrameLayout>