Setting shadow on android TabLayout

I want to remove the shadow under the TabLayout. I tried setting this function as a theme, but it does not work:

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

Or

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

I wandered if there is another way to do this, from an XML declaration or from code behind an instance of TabLayout.

I know about this solution that does not work for me. Get rid of the gradient at the top of Activity (Android) Please do not offer a theme fix , I know this is the best android to go here, but this is not an option for me.

This is my XML declaration:

   <android.support.design.widget.TabLayout xmlns:app="http://schemas.android.com/apk/res-auto"
                android:id="@+id/sliding_tabs"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:background="@android:color/white"
                app:backgroundTint="@android:color/transparent"
                app:tabIndicatorColor="@android:color/transparent"
                app:tabMode="scrollable"
                app:tabSelectedTextColor="@color/tab_on_state"
                app:tabTextColor="@color/tab_off_state" />
+4
source share
1 answer

TabLayout, , . TabLayout ActionBar, ActionBar , . ActionBar, , , AppBarLayout

+3

Source: https://habr.com/ru/post/1598572/


All Articles