qwr qwr
qwr qwr

Reputation: 1059

android:tabStripEnabled="false" doesn't work

I was using tabhost and trying to disable the tab border line. I used this android:tabStripEnabled="false" in my XML but it doesn't seem to be working, the line was still there, and I try other way like making changes in the style.xml(which I found from stackoverflow) but it doesn't work either. Any idea?

my tab xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <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:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:orientation="vertical" >

            <FrameLayout
                android:id="@android:id/tabcontent"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:layout_above="@android:id/tabs" />

            <TabWidget
                android:id="@android:id/tabs"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentBottom="true"
                android:background="#FFFFFF"
                android:tabStripEnabled="false"
                android:layout_gravity="bottom" />
        </RelativeLayout>
    </TabHost>

</LinearLayout>

Upvotes: 4

Views: 3424

Answers (2)

SkyNetRush
SkyNetRush

Reputation: 105

It requires minSDK 8 (2.2) at least... Review your manifest.

Be sure that there insn't a line, in your code, setting tab's background (I had this problem ...) ;)

Upvotes: 1

Ramesh Akula
Ramesh Akula

Reputation: 5750

You can remove the bottom strip of tabs and divider between tabs by using following statement.

    TabHost t;
    t.getTabWidget().setStripEnabled(false);
    t.getTabWidget().setDividerDrawable(R.drawable.ic_launcher);

Upvotes: 2

Related Questions