<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<android.support.design.widget.TabLayout
android:id="@+id/f1_tab_layout"
android:layout_width="match_parent"
app:tabTextColor="@color/gray"
app:tabSelectedTextColor="@color/red"
app:tabMode="scrollable"
app:tabGravity="fill"
app:tabIndicatorColor="@color/red"
android:layout_height="60dp"/>
<android.support.v4.view.ViewPager
android:layout_below="@id/f1_tab_layout"
android:id="@+id/f1_viewPage"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</RelativeLayout>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<android.support.design.widget.TabLayout
android:id="@+id/f1_tab_layout"
android:layout_width="match_parent"
app:tabTextColor="@color/gray"
app:tabSelectedTextColor="@color/red"
app:tabMode="scrollable"
app:tabGravity="fill"
app:tabIndicatorColor="@color/red"
android:layout_height="60dp"/>
<android.support.v4.view.ViewPager
android:layout_below="@id/f1_tab_layout"
android:id="@+id/f1_viewPage"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</RelativeLayout>