<com.google.android.material.tabs.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabIndicatorFullWidth="false"
app:tabUnboundedRipple="true"
app:tabTextColor="@color/font_hint"
app:tabSelectedTextColor="@color/font_color1"
app:tabRippleColor="@color/bg_main_color"
app:tabIndicatorColor="@color/bg_main_color"
app:tabIndicator="@drawable/indicator"
app:tabIndicatorGravity="bottom"
app:tabMode="fixed"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/layout_search_result" />
app:tabIndicatorFullWidth:指示器的长度是否铺满整个tab
app:tabUnboundedRipple:是否启用水波纹样式
app:tabRippleColor:水波纹样式的颜色
app:tabIndicator:指示器的样式
app:tabIndicatorGravity:指示器的位置
app:tabMode:指示器的模式(fixed,scrollable,auto)