Brad Brad - 8 months ago 74
Android Question

Get rid of ActionBar shadow over SlidingTabLayout

I'm porting my app to appcompat21, using SlidingTabLayout for tabs in an ActionBarActivity. The Action bar is casting a shadow over the tab strip, and I can't figure out how to get rid of it:enter image description here

Here's what I have:

<style name="MyActionBar" parent="@style/Widget.AppCompat.ActionBar">
<item name="background">@color/app_primary</item>
<item name="android:background">@color/app_primary</item>
<item name="backgroundSplit">@color/black</item>
<item name="android:backgroundSplit">@color/black</item>
<item name="android:elevation">0dp</item>

I've also tried

<item name="android:windowContentOverlay">@null</item>

I got the shadow under the tab bar by setting its elevation in the layout file, but now I have two shadows...
Any idea how to fix this?


For some reason, this did not work for as well:

<item name="android:elevation">0dp</item>


<item name="android:windowContentOverlay">@null</item>

I am currently using, for ActionBar: