Search code examples
androidandroid-toolbarandroid-tablayout

How do I remove the divider between Toolbar and TabLayout


I got a tablayout:

<android.support.design.widget.TabLayout
        android:id="@+id/tabs"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@android:color/white"
        android:elevation="4dp"
        app:tabMode="fixed"
        app:tabGravity="fill"
        app:tabBackground="@color/colorPrimary"
        app:tabTextColor="@android:color/white"
        app:tabSelectedTextColor="@android:color/white"/>

and a toolbar but there is still a small line between the toolbar and the divider. I haven't set a toolbar style yet. How do I remove the divider?

heres an image of the divider


Solution

  • please update your style.xml with that

     <item name="android:windowContentTransitions">true</item>
        <item name="android:windowAllowEnterTransitionOverlap">true</item>
        <item name="android:windowAllowReturnTransitionOverlap">true</item>
        <item name="android:windowSharedElementEnterTransition">@android:transition/move</item>
        <item name="android:windowSharedElementExitTransition">@android:transition/move</item>