Skip to content Skip to sidebar Skip to footer

Line Coming Between Toolbar And Tabs

How to remove the deep line between the toolbar and tablayout, I searched on the google someone said , add some elevation to the toolbar and tablayout ,I did but it not worked , af

Solution 1:

I had the same problem, i was using android:elevation="0dp" but it didn't work. To the AppBarLayout in xml, set app:elevation="0dp" instead of android:elevation="0dp".

Solution 2:

I had same problem and used android:elevation="0dp" and app:elevation="0dp" but problem not solved.Then i changed the elevation of toolbar dynamically.By using this

getSupportActionBar().setElevation(0);

and it worked for me.

Solution 3:

Remove your Relative Layouts and put the TabLayout inside the appbarlayout, below the toolbar, and remove all of the elevation people suggested to add. This is the right way to do it. If it doesn't work for you, I'll be glad to help.

Solution 4:

Solution 5:

I try all the above methods but no one work for me !

Then i simply remove the AppBarLayout Widget from xml. It solve my problem

Causes Problem

 <android.support.design.widget.AppBarLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:elevation="0dp">

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/app_theme_black_color"local:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
</android.support.design.widget.AppBarLayout>

Solved Problem (Just remove the AppBarLayout)

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/app_theme_black_color"local:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />

Share to improve.

Post a Comment for "Line Coming Between Toolbar And Tabs"