5

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

zebleckDAMM
  • 333
  • 1
  • 4
  • 14

4 Answers4

5

Just add app:elevation="0dp" in your AppBarLayout Widget [android.support.design.widget.AppBarLayout] which has a toolbar wrapped. It will do the work!

Roman Marusyk
  • 23,328
  • 24
  • 73
  • 116
Srini
  • 51
  • 1
  • 4
1

http://www.androidhive.info/2015/09/android-material-design-working-with-tabs/

You can check whether that site create toolbar & tablayout

also u can trying with removing "android:elevation" tag.

Lovekesh
  • 125
  • 11
0

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>
NIKHIL SONI
  • 84
  • 1
  • 1
0

Add app:elevation="0dp" in your AppBarLayout widget like this

<android.support.design.widget.AppBarLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:elevation="0dp"
    android:theme="@style/NavStyle">

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="?attr/colorPrimary"
        app:popupTheme="@style/ToolbarStyle" />

</android.support.design.widget.AppBarLayout>
Nelson Katale
  • 1,309
  • 15
  • 21