Android Dashboards tab at the bottom of the screen

I agree with anyone who wants to make the argument that the tabs should be at the top of the screen, but I can not control the requirements for my application :). I need to create a tabbed application at the bottom of the screen. I am using SDK 14 and Actionbars. Is it possible? I have already built the tabbed layout below, but when I add tabs to the ActionBar, they automatically appear at the top of the screen.

Any ideas would be really appreciated, and thanks to everyone for taking the time to read this post.

+7
source share
1 answer

You can use Tabhost for the requirement, and inside tab.xml you can write the code below. This will work fine.

<?xml version="1.0" encoding="UTF-8"?> <TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent"> <RelativeLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1" > </FrameLayout> <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" android:tabStripEnabled="false" android:layout_alignBottom="@android:id/tabcontent" android:background="#000000" /> </RelativeLayout> </TabHost> 
+1
source

All Articles