How To Create Bottom Menu Like Gmail Android
Solution 1:
I suggest you to use the Sherlock ActionBar:
This allows you to easily develop an application with an action bar for every version of Android from 2.x and up.
In the sample app you can find the code to achieve what you are looking for under "Split Action Items". The idea is that you add actions from the menu as usual, but writting the following line in your manifest activity:
android:uiOptions="splitActionBarWhenNarrow"
Solution 2:
You can create a menu which will sit on the bottom of a listview using the <RelativeLayout>
tag like so
<RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:orientation="vertical"android:layout_width="match_parent"android:layout_height="wrap_content" ><ListViewandroid:layout_height="wrap_content"android:layout_width="fill_parent"android:id="@android:id/list"android:listSelector="@android:color/transparent"android:layout_above="@+id/footer" /><includeandroid:id="@+id/footer"android:layout_height="wrap_content"layout="@layout/mymenu"android:layout_width="fill_parent"android:layout_centerHorizontal="true"android:layout_alignParentBottom="true" ></include></RelativeLayout>
mymenu will contain a linearlayout with something like a tablelayout with a few rows (which can be textviews, imageviews, etc.) The table will sit at the bottom of your screen and the listview will be in a frame which starts at the top of the screen and ends at the top of the menu (no overlap)
You could also do the same for the top of the screen by simply having the listview say layout_below="@+id/header"
instead of layout_above"@+id/footer"
(or do both!)
Solution 3:
This is covered on android. You have to implement a "split action bar". Note that it works in potrait view and disappears when you switch to landscape. Android Action Bar
Solution 4:
It looks like a custom ActionBar implementation. If you put icons in a normal ActionBar
and there is not enough space to display them, android creates a bottom bar on its own and display the icons there.
I had a similar application and I chose to put my own custom bar there instead of implementing ActionBar
Post a Comment for "How To Create Bottom Menu Like Gmail Android"