0

I am trying to remove the shadow between my tabs and the actionbar, and I want to have shadow below the slidingTabs. I have implemented my tabs with this approach. Which means it is not possible to configure the actionbar layout with the normal theme approach.

Here is a picture of what I want: enter image description here

How can I do this?

Edit: Here is the XML file:

<?xml version="1.0" encoding="utf-8"?>
<com.astuetz.PagerSlidingTabStrip
    android:id="@+id/tabs"
    app:pstsShouldExpand="true"
    app:pstsTextAllCaps="true"
    app:pstsIndicatorHeight="5dp"
    app:pstsIndicatorColor="#FFFFFF"        
    app:pstsDividerColor="#CE2A2F"        
    android:textColor="#FFFFFF"
    android:background="#CE2A2F"
    android:layout_width="match_parent"
    android:layout_height="48dp">
</com.astuetz.PagerSlidingTabStrip>

<android.support.v4.view.ViewPager
    android:id="@+id/viewpager"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@android:color/white" />
Kæmpe Klunker
  • 865
  • 1
  • 10
  • 27

1 Answers1

3

On pre-Lollipop devices you need to set android:windowContentOverlay to null.

On lollipop you can call getSupportActionBar().setElevation(0) or set the elevation attribute in your Action Bar style.

Mattia Maestrini
  • 32,270
  • 15
  • 87
  • 94