What is the name of this ? How to design it ? any valid usefull tutorial example ?
-
2it's most likely a horizontal linearlayout – thumbmunkeys Oct 06 '15 at 13:32
-
Use Tab-host for this – Shadik Khan Oct 06 '15 at 13:33
-
I call it a `footer`. It can be any layout (not necessarily Linear) or any View (even a custom one). – Phantômaxx Oct 06 '15 at 13:33
-
@Sadiq what is tab host – Baalback Oct 06 '15 at 13:37
-
@Baalback Please follow this link http://envyandroid.com/align-tabhost-at-bottom/ – Shadik Khan Oct 06 '15 at 13:38
-
@Sadiq what is difference between tabhost and split action ? if tab host exists why people use linearlayout design ? I am thinking to post that as another question – Baalback Oct 06 '15 at 13:43
-
@Baalback check my updated answer. – Rahul Tiwari Oct 06 '15 at 14:07
3 Answers
This is called split action bar in android
Split action bar provides a separate bar at the bottom of the screen to display all action items when the activity is running on a narrow screen (such as a portrait-oriented handset).
Mock-ups showing an action bar with tabs (left), then with split action bar (middle); and with the app icon and title disabled (right).
Update:
In newer UI patterns it is called bottom toolbar
Bottom toolbar that launches to a shelf and clings to the top of the keyboard or other bottom component
Refer this question to create one.
Note: android does not have text with icon in its UI elements for actions, screenshot in question seems to be of a hybrid application, and suggestions in answer are closest supported by default UI patterns for native apps.

- 1
- 1

- 6,851
- 3
- 49
- 78
-
2What is shown in the screenshot is not a split action bar. A split action bar does not have captions below icons, for example. – CommonsWare Oct 06 '15 at 13:33
-
@CommonsWare Yes, missed the text. however all of them are actions and not the tabs. – Rahul Tiwari Oct 06 '15 at 13:36
-
1
-
-
split action bar is closest to the pattern shown. this pattern is not recommended for tabs. – Rahul Tiwari Oct 06 '15 at 13:40
-
-
I actually checked again in material design manual a [bottom toolbar](https://www.google.co.in/design/spec/layout/structure.html#structure-toolbars) can be used for this purpose. – Rahul Tiwari Oct 06 '15 at 13:56
-
@RahulTiwari oh great ill check that . but what is the difference betweent tabhost and bottom toolbar ? do you have any idea? – Baalback Oct 06 '15 at 14:11
-
@Baalback tab host is basically for navigation and bottom toolbar is for actions. – Rahul Tiwari Oct 06 '15 at 14:13
Yes, you can use a linear layout. Whatever you want as long as you make it look good.
The trick is to making it stick to the bottom of the screen. I like to contain everything in a relative layout and set that linear layout inside the relative layout and making it align to the bottom of it's parent.
example layout:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New Button"
android:id="@+id/button1"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New Button"
android:id="@+id/button2"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New Button"
android:id="@+id/button3"/>
</LinearLayout>
</RelativeLayout>
android:layout_alignParentBottom="true" is the important part here, but there are other ways to make the linear layout stay at the bottom.

- 615
- 12
- 34
-
-
-
The layout I posted basically puts three buttons into a linear layout bound to the bottom of the screen. You're going to have to put a little more effort into prettying it up. – BooleanCheese Oct 06 '15 at 14:12
You can do something like this to add buttons in bottom bar :
<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>

- 5,411
- 4
- 30
- 47