Reputation: 799
I want to apply Black Line Under the TabView,
Here is My Code,
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:background="#ffffff"
android:layout_marginTop="40dip"
android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical"
android:background="#ffffff"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TabWidget android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:tabStripEnabled="false"
android:layout_marginBottom="-3dp"
android:layout_height="40dip"
android:layout_marginLeft="0dip"
android:layout_marginRight="0dip" />
<FrameLayout android:id="@android:id/tabcontent"
android:background="#ffffff"
android:layout_height="fill_parent" />
Can Anyone tell me how to do it ?
Upvotes: 1
Views: 717
Reputation: 1932
You can put this in tabwidget
android:tabStripEnabled="false"
to remove that line
Upvotes: 1
Reputation:
Apply a custom theme to your activity, and null out the android:windowContentOverlay
attribute.
Define a theme in themes.xml
:
<style name="YourTheme">
...
<item name="android:windowContentOverlay">@null</item>
...
</style>
Apply the theme on your application or the activity in AndroidManifest.xml:
<application android:theme="@style/YourTheme"
... >
Hope it helps. It caused me lots of headache...
Upvotes: 3
Reputation: 11975
A few days ago i met with same issue.I have gone through stackoverflow.There are various question are already present.So go through below link
How to remove gray scale border from tab layout
Upvotes: 1
Reputation: 23391
Are you talking about the divider at the bottom of the TabWidget? If so, simply add android:layout_marginBottom="-5px"
to the TabWidget. This will move the TabWidget off the bottom of the screen 5 pixels, just enough so you don't see the divider.
The FrameLayout, which I assume you're using, will compensate in size so it works out perfectly.
Upvotes: 0