TabLayout添加两个属性:
app:tabBackground="@color/colorTransparent"
app:tabRippleColor="@color/colorTransparent"
全部设置:
<com.google.android.material.tabs.TabLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_gravity="bottom"
android:background="@color/colorWhite"
app:tabBackground="@color/colorTransparent"
app:tabRippleColor="@color/colorTransparent"
app:tabMode="fixed"
app:tabIndicatorHeight="@dimen/framework_0dp"
app:tabTextAppearance="@style/main_tabText" />
网友评论