How to remove line between Toolbar and TabStrip?
Closed this issue · 3 comments
How do I remove the grey shadow/line as shown above?
My layout is as follows:
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" app:theme="@style/ThemeOverlay.AppCompat.ActionBar" android:background="?attr/colorPrimaryDark"/>
<com.astuetz.PagerSlidingTabStrip android:id="@+id/tabs" android:layout_width="match_parent" android:layout_height="40dp" android:elevation="4dp" android:background="?attr/colorPrimary" android:textColor="@color/white" app:pstsIndicatorColor="@color/white" app:pstsShouldExpand="true" />
You have to set the same "elevation" that the toolbar.
To do that add the next attribute to you PSTS:
<com.astuetz.PagerSlidingTabStrip
.......
android:elevation="4dp"
.......
/>
Hi @IGZJcMinarro, the elevation attribute is already defined though.
Might it be related to way I inflate my layouts?
The toolbar is defined in activity_main.xml which is inflated in MainActivity.java. Fragments are then inserted in by navigation drawer. I do not use <include layout.../>
like done in the sample app.
For the white line:
pstsIndicatorHeight
for container
pstsUnderlineHeight
for each tab
Shadow is your call, it is not part of this lib. You manage it. Either elevation or a drawable you added.
http://www.stackoverflow.com is a good place to ask this question.