Use TabLayout instead of PagerTabStrip

TabLayout is more in line with current Android design guidelines
This commit is contained in:
Synced Synapse 2018-05-10 18:27:30 +01:00 committed by Martijn Brekhof
parent de683826ad
commit 169bb3f781
2 changed files with 9 additions and 13 deletions

View File

@ -15,8 +15,8 @@
limitations under the License.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -26,11 +26,14 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.view.PagerTabStrip
android:id="@+id/pager_tab_strip"
<android.support.design.widget.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="@dimen/tab_strip_height"
style="@style/TabStrip"/>
android:layout_height="wrap_content"
app:tabMode="scrollable"
app:tabTextColor="@color/white_dim_50pct"
app:tabSelectedTextColor="@color/white"
android:background="?attr/colorPrimary"/>
</android.support.v4.view.ViewPager>

View File

@ -96,13 +96,6 @@
<item name="android:singleLine">true</item>
</style>
<!-- PagerSlidingTabStrip -->
<style name="TabStrip">
<item name="android:textAppearance">@style/TextAppearance.AppCompat.Subhead</item>
<item name="android:background">?attr/colorPrimary</item>
<item name="android:textColor">@color/white</item>
</style>
<style name="ViewPagerIndicator">
<item name="fillColor">?attr/appTextColorPrimary</item>
<item name="strokeColor">?attr/appTextColorSecondary</item>