Skip to content Skip to sidebar Skip to footer

How To Set Tab Bar At The Bottom In Android?

I am using a tab bar in android. By default, it displays at the top. I want it to be displayed at the bottom. Can someone please explain how to do this?

Solution 1:

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

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

Solution 2:

Solution 3:

<?xml version="1.0" encoding="utf-8"?><TabHostxmlns: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" ><RelativeLayoutandroid:layout_width="fill_parent"android:layout_height="fill_parent"android:orientation="vertical"android:padding="5dp" ><FrameLayoutandroid:id="@android:id/tabcontent"android:layout_width="fill_parent"android:layout_height="fill_parent"android:padding="5dp" /><TabWidgetandroid:id="@android:id/tabs"android:layout_width="fill_parent"android:layout_height="wrap_content"android:layout_alignParentBottom="true" /></RelativeLayout>>

</TabHost>

Post a Comment for "How To Set Tab Bar At The Bottom In Android?"