TabLayout有静态动态两种实现方法 并实现多个标题或控件实现滑动
废话不多说
直接上代码
布局
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="a16.erin.tablayout_demo.MainActivity">
<android.support.design.widget.TabLayout
android:id="@+id/mytag_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabSelectedTextColor=