提问人:CatIsCoding 提问时间:11/12/2023 最后编辑:Mark RotteveelCatIsCoding 更新时间:11/12/2023 访问量:17
如何在底部导航视图中更改所选项目叠加?
How to change selected item overlay in bottom navigation view?
问:
我想更改导航栏中所选项目的叠加层的颜色。我想改变什么我不想更改项目本身的颜色,而是更改其形状的颜色(图像上的紫色)。由于这是 Android 显示导航栏的一种新方式,因此我找不到任何在线工作内容。 这是我的导航栏的代码:
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottomNavigationView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:backgroundTint="@color/colorPrimaryDark"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:labelVisibilityMode="selected"
app:menu="@menu/bottom_menu" />
我已经尝试修改 theme.xml 中的值,并在布局文件中使用了某些属性。没有什么可以改变叠加层的颜色。
答: 暂无答案
下一个:底部导航所选项目突出显示
评论