【发布时间】:2022-06-22 20:33:59
【问题描述】:
我的应用程序的主要样本是绿色,但 Material 3 底部导航栏具有浅紫色的活动指示器。我想把它改成浅绿色。有人可以告诉 XML 中的哪个属性应该更改吗? enter image description here
【问题讨论】:
标签: android-layout
我的应用程序的主要样本是绿色,但 Material 3 底部导航栏具有浅紫色的活动指示器。我想把它改成浅绿色。有人可以告诉 XML 中的哪个属性应该更改吗? enter image description here
【问题讨论】:
标签: android-layout
我可以更改指示器颜色的属性如下。
<item name="colorSecondaryContainer">@color/your_color</item>
您必须添加到您的应用程序的样式中,如下所示。
希望对你有帮助。
【讨论】:
在主题上添加新样式:
<style name="BottomNavigationView">
<item name="colorSecondaryContainer">@color/white</item>
</style>
在BottomNavigationView上添加主题信息
android:theme="@style/BottomNavigationView"
【讨论】: