How to set the tab bar below in Android?

I use the tab bar in android.

By default, it is displayed at the top.

I want it displayed below.

Can someone explain how to do this?

+7
source share
3 answers

Please check this link: How to align TabHost at the bottom of the screen

Adding android: layout_alignParentBottom = "true" for TabWidget does the trick.

+23
source

Just place the content layout above the tab widgets. See the following link for more information. Android: tabs in bottom

+6
source
<?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" android:padding="1dp" > <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:padding="5dp" > <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="5dp" /> <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" /> </RelativeLayout>> </TabHost> 
+2
source

All Articles