需要替换主题parent
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
替换为
<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar.Bridge">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
这篇博客介绍了如何将Android应用的主题从Theme.AppCompat.Light.DarkActionBar替换为Theme.MaterialComponents.Light.NoActionBar.Bridge,这是Android UI现代化的一个重要步骤,涉及到颜色主题的定制和组件样式的更新。
889

被折叠的 条评论
为什么被折叠?



