leo
leo

Reputation: 135

How to remove black line from tabbar in Android?

I implemented tab bar in android application but i m facing a issue with black line.Can any one help me with this

alt text

 <TabHost xmlns:android="http://schemas.android.com/apk/res/android"
         android:id="@android:id/tabhost"
         style="@style/tabhost">

    <LinearLayout   android:orientation="vertical"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    >

        <TabWidget    android:id="@android:id/tabs"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"></TabWidget>

        <FrameLayout
            android:id="@android:id/tabcontent"
            style="@style/tabcontent"/>                

    </LinearLayout>

</TabHost>

<style name="tabhost">
    <item name="android:layout_width">fill_parent</item>
    <item name="android:layout_height">fill_parent</item>
    <item name="android:background">#b1b1b1</item>
</style>

<style name="tabcontent">
    <item name="android:layout_width">fill_parent</item>
    <item name="android:layout_height">fill_parent</item>
    <item name="android:background">#FFFFFF</item>
    <item name="android:paddingTop">1dip</item>
</style>

Upvotes: 0

Views: 1349

Answers (1)

mr_z_ro
mr_z_ro

Reputation: 763

Add this line to the associated java class:

tabHost.getTabWidget().setStripEnabled(false);

(Source)

Upvotes: 2

Related Questions