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:
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>
</style>
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>
and:
<item name="android:windowContentOverlay">@null</item>
I am currently using, for ActionBar
:
this.getSupportActionBar().setElevation(0);
When working with "Elevation", objects can be different elevations from one another, giving shadows to anything underneath them.
If you set your toolbar and the tabs layout the same elevation it will fix the issue.
Add app:elevation="0dp"
on .support.design.widget.AppBarLayout
. This will solve the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With