well you can't force to stay at the bottom on tablets but if phone yeah you can do that through the manifest. but you can do something is similar to bottom bar and top bar.
will in this example i'll show you how to use merge to do that easily without the need of using android ActionBar.
first thing you need to create is your main_activity.xml
in my case the main_activity.xml
only contains ImageView
on RelativeLayout. here is the code.
<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"
tools:context=".MainActivity" >
<RelativeLayout android:id="@+id/RelativeLayout04"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_alignParentTop="true">
<include layout="@layout/header" />
</RelativeLayout>
<ImageView
android:id="@+id/view"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_above="@+id/RelativeLayout03"
android:layout_below="@+id/RelativeLayout04"
android:layout_centerHorizontal="true"
android:src="@android:drawable/alert_dark_frame" />
<RelativeLayout android:id="@+id/RelativeLayout03"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
<include layout="@layout/tryit" />
</RelativeLayout>
as you can see in above code, there are two merges i put inside the main_activity.xml
one defined at bottom and one defined at the top.
here is the fake bottom bar xml.
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:id="@+id/LinearLayout01"
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_weight="0.14"
android:background="@drawable/dock" >
<ImageView
android:id="@+id/dark"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.14" />
<ImageView
android:id="@+id/stock"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.14" />
<ImageView
android:id="@+id/open"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.14" />
<ImageView
android:id="@+id/border"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.15" />
<ImageView
android:id="@+id/color"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.15"
/>
</LinearLayout>
i'm putting a fixed background to the LinearLayout
and fake the ImageView for onClicks.
and here is the top bar. `
<LinearLayout
android:id="@+id/LinearLayout02"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_weight="0.14"
android:background="@drawable/dock1"
android:layout_gravity="top">
<ImageView
android:id="@+id/darka"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.14" />
<ImageView
android:id="@+id/stocka"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.14" />
<ImageView
android:id="@+id/opena"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.14" />
<ImageView
android:id="@+id/bordera"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.15" />
<ImageView
android:id="@+id/colora"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.15"
/>
</LinearLayout>
`
which also copy paste from the bottom bar above. just change one thing from android:layout_alignParentBottom="true"
to android:layout_alignParentTop="true"
and you got an actionBar at the bottom and at the top. in this case you wont need to use the ActionBar so i suggest you to use Theme.Holo.NoActionBar
and here is the image result :- https://i.sstatic.net/uPsNb.png
this is a project i'm working on Now. done almost everything but still struggling with the design. hope my answer benefit you. please vote the answer up if you found it interesting.
best regards. ~Kosh