Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 576
zebleckDAMM Avatar asked Jul 16 '16 14:07

zebleckDAMM


2 Answers

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

like image 102
Srini Avatar answered Oct 21 '22 08:10

Srini


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.

like image 42
Lovekesh Avatar answered Oct 21 '22 08:10

Lovekesh