Search code examples
androidandroid-actionbarandroid-tabsandroid-actionbar-compat

Remove shadow between Actionbar and Tab


My app is using an own style which I made with the Android Action Bar Style Generator (Style compatibility = AppCombat). The color of the Actionbar and the tab are the same but the problem is that there is a shadow between them. How can I remove this shadow?

<style name="MyAppTheme" parent="android:Theme.Holo.Light">
<item name="android:windowContentOverlay">@null</item>

"android:windowContentOverlay" is removing the shadow below the tab and not above. enter image description here


Solution

  • Ok here's the solution by Audren Teissier which worked for me:

    It's because you are using a drawable instead of a color.look for something like this:

    <style name="MyActionBar"
    parent="@android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">
    <item name="android:background">@color/yourcolor</item>
    </style>
    

    Replace the drawable by a color like above and it should go away.