android:tabStripEnabled="false" doesn't work

android, android-layout

Solution

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);

Problem

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> ```

Original source