【问题标题】:Material 3 Active indicator color材料 3 活动指示灯颜色
【发布时间】:2022-06-22 20:33:59
【问题描述】:

我的应用程序的主要样本是绿色,但 Material 3 底部导航栏具有浅紫色的活动指示器。我想把它改成浅绿色。有人可以告诉 XML 中的哪个属性应该更改吗? enter image description here

【问题讨论】:

标签: android-layout


【解决方案1】:

我可以更改指示器颜色的属性如下。

 <item name="colorSecondaryContainer">@color/your_color</item>

您必须添加到您的应用程序的样式中,如下所示。

Style

希望对你有帮助。

【讨论】:

  • 请在您的答案中添加您的图片代码。
【解决方案2】:

在主题上添加新样式:

<style name="BottomNavigationView">
    <item name="colorSecondaryContainer">@color/white</item>
</style>

在BottomNavigationView上添加主题信息

android:theme="@style/BottomNavigationView"

【讨论】:

    猜你喜欢
    • 2022-01-20
    • 2020-01-15
    • 2018-08-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-02-28
    • 2018-05-09
    • 1970-01-01
    相关资源
    最近更新 更多