How can I remove the divider between the ActionBar and the tabs

三世轮回 提交于 2019-11-29 04:33:07
Vincent D.

The Theme.Holo.Light has a default shadow on the bottom, so probably appCompat too, Try to use the default one Theme.AppCompat.

Your background use image, try to use a @color/tab_color like this.

<style name="Widget.Styled.ActionBar"
    parent="@style/Widget.AppCompat.Light.ActionBar.Solid">
    <item name="android:background">@color/tab_color</item>
    <item name="android:backgroundStacked">@color/tab_color</item>
    <item name="android:backgroundSplit">@color/tab_color</item>
    <item name="android:textColor">@color/tab_text</item>
    <item name="android:titleTextStyle">@style/MyActionBarTextColor</item>
    <item name="android:actionBarDivider">@color/tab_color</item>
</style>

Sources :

ActionBarSherlock issue

Removing line or divider in Android

Remove divider under actionbar

Remove blue divider on ICS

edwinj

You can easily remove the divider by pasting this code in you styles.xml file

<item name="windowActionBarOverlay">true</item>
<item name="android:windowActionBarOverlay">true</item>

But according to Googles new Tab design principles, the tab strip is designed differently and there is also a different way of using colors.

I tried the posted answers but for some reason they didn't work for me. This did:

    <item name="windowActionBarOverlay">true</item>
    <item name="android:windowActionBarOverlay">true</item>

I set those properties in my app's theme and it worked for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!