How can I remove that line from my tab view? Or can I set height or colors for it?
Asked
Active
Viewed 2,765 times
0
-
1Check this post : http://stackoverflow.com/questions/3543478/remove-the-bottom-line-border-in-tab-bar-and-change-selected-color – Kartik Domadiya Apr 12 '11 at 11:46
-
I have checked it. Problem is going on. – Pankaj Kumar Apr 12 '11 at 11:46
1 Answers
7
try defining a new theme with windowContentOverlay set to null:
<style name="MyTheme" parent="@android:style/Theme>
<item name="android:windowContentOverlay">@null</item>
</style>
And then apply this theme to your activity in your manifest (or you can apply it to the element to apply it application-wide):
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.stylingandroid.VectorDrawables" android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="10" />
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".MainActivity"
android:label="@string/app_name" android:theme="@style/MyTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
That should remove the shadow.
If you want to change the colour of it set android:cacheColorHint in the style.

Mark Allison
- 21,839
- 8
- 47
- 46
-
Where sholud I use android:cacheColorHint ? Can you give me example please. – Pankaj Kumar Apr 12 '11 at 12:07
-
And one more thing, a gray background displaying in bottom of deselected tabs how can change or remove it? – Pankaj Kumar Apr 12 '11 at 12:10
-
Use
- #00000000
(or another colour if you want to actually see it) in the style in the same way as the android:windowContentOverlay item. – Mark Allison Apr 12 '11 at 16:17 -
Your question about the grey background may be better asked as a separate question. Also, provide a screen shot similar to the one in this question so that it's claer precisely what you're referring to. – Mark Allison Apr 12 '11 at 16:19