Theme.MaterialComponents.Light 来自 material 库的主题坏了?

Theme.MaterialComponents.Light theme from material library is broken?

我在 1.1.0 版上使用 material 库。

第一张图片 "Theme.MaterialComponents.Light" 没有任何定制。我期待轻型操作栏

第二张图片 "Theme.MaterialComponents.Light" 定义了 colorPrimary 和 colorPrimaryDark。操作栏现在按预期接缝,但所有其他组件都是错误的

似乎所有组件都使用 colorPrimary 而不是 colorAccent 或 colorSecondary。

它附加在 material 库 1.0.0 和 1.1.0 上,但不附加在旧的 AppCompat 主题上。

这是一个错误还是我遗漏了什么?

这是直接使用@style/Theme.MaterialComponents.Light

这是在使用

<style name="Theme.MaterialComponents.Light.App">
    <item name="colorPrimaryDark">@color/primary_dark_material_light</item>
    <item name="colorPrimary">@color/primary_material_light</item>
</style>

为了修复 material 库的 "ipotetical bug",我像这样覆盖了 actionbar 主题。它有效,但接缝不太优雅

<style name="Theme.MaterialComponents.Light.App">
    <item name="actionBarTheme">@style/Widget.MaterialComponents.Light.ActionBar.Solid.App</item>
    <item name="colorPrimary">#any</item>
</style>

<style name="Widget.MaterialComponents.Light.ActionBar.Solid.App">
    <item name="colorPrimary">@color/primary_material_light</item>
</style>