在 tablayout 中删除高亮显示
Remove highlight on press in tablayout
如何在按下标签时禁用此突出显示。找了半个小时也没找到。我正在使用 tablayout。
只需将背景颜色设置为透明或tablayout 的背景颜色。将以下代码添加到父布局。
xmlns:app="http://schemas.android.com/apk/res-auto"
并将以下内容添加到 tablayout。
app:tabBackground="?attr/colorPrimary"
android:background="?attr/colorPrimary"
这将解决您的问题。在 Android M.
中测试
将以下行添加到您的 XML:
app:tabRippleColor="@android:color/transparent"
如何在按下标签时禁用此突出显示。找了半个小时也没找到。我正在使用 tablayout。
只需将背景颜色设置为透明或tablayout 的背景颜色。将以下代码添加到父布局。
xmlns:app="http://schemas.android.com/apk/res-auto"
并将以下内容添加到 tablayout。
app:tabBackground="?attr/colorPrimary"
android:background="?attr/colorPrimary"
这将解决您的问题。在 Android M.
中测试将以下行添加到您的 XML:
app:tabRippleColor="@android:color/transparent"