一:导入依赖:
implementation 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar'
二:布局文件:
布局文件:SegmentTabLayout+viewpager
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activity.SearchMessageActivity"
android:orientation="vertical"
>
<com.flyco.tablayout.SegmentTabLayout
android:id="@+id/tabLayout"
android:layout_marginTop="@dimen/dp_20"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_40"
android:layout_marginB