Remove Shadow API TabLayout 21

1

I want to remove the shadow from TabLayout , but in API 21 nothing is working.

I tried to set windowContentOverlay or elevation to null and nothing works.

The rendered screen looks like this:

Andmycodelookslikethis:

<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget.AppBarLayout android:layout_height="wrap_content" style="@style/tabs" android:layout_width="match_parent"> <android.support.design.widget.TabLayout android:id="@+id/tabs" android:layout_width="match_parent" style="@style/tabs" android:layout_height="wrap_content" app:layout_scrollFlags="scroll|enterAlways"/> </android.support.design.widget.AppBarLayout> <android.support.v4.view.ViewPager android:id="@+id/viewpager" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior" /> </android.support.design.widget.CoordinatorLayout>

Can anyone help me?

    
asked by anonymous 13.08.2015 / 03:06

1 answer

0

Do this in Activity onCreate

TabLayout tabs = (TabLayout)findViewById(R.id.tabs);
tabs.setElevation(0);
    
13.08.2015 / 03:37