这个是大致效果:本应该是动图的,但是没有整(ps:他不会)
<android.support.design.widget.TabLayout
android:id="@+id/fra1_tab"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="5"
app:tabGravity="fill"//使tab充满解决部分安卓版本不能充满问题
app:tabMode="scrollable">//让tab可以滑动
</android.support.design.widget.TabLayout>
因为是笔记,所以会有其他人的链接,如果侵权了,请留言,我会更改,谢谢
这个是一大神的关于tab的感觉很有用
https://blog.csdn.net/qq_37293612/article/details/54909935