我在使用 kotlin 的 Android 中使用底部导航菜单时遇到问题 我无法禁用所选项目的图标突出显示,任何人都可以帮助我吗?
我搜索了网络,但找不到任何隐藏底部导航菜单中图标周围突出显示的解决方案
如果您使用 xml:
val bottomNavigationView: BottomNavigationView = findViewById(R.id.bottomNavigationView)
bottomNavigationView.itemActiveIndicatorColor = getColorStateList(R.color.black)
用于撰写
NavigationBarItem
的设置颜色:
colors = NavigationBarItemDefaults.colors(indicatorColor = Color.Black)