Line coming between toolbar and Tabs

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".


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.


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.