android - 为什么 android:colorBackground 在某些设备上不起作用?
问题描述
<resources>
<style name="Theme.MyApplication" parent="Theme.MaterialComponents.Light">
<item name="android:colorBackground">#26A69A</item>
</style>
</resources>
我想知道为什么android:colorBackground
在某些设备上不起作用。我在 API 21 (Not working)
、24 (Not Working)
和29 (Working)
.
解决方案
在我这样更改后它现在可以工作了
<resources>
<style name="Theme.MyApplication" parent="Theme.MaterialComponents.Light">
<item name="android:colorBackground">@color/myColor</item>
</style>
</resources>
推荐阅读
- php - 权限系统,$_SESSION 和数据库存储哪个更好?
- c++ - Bjarne Stroustrup 在他的常见问题解答中对“基础库”是什么意思?
- asp.net-mvc - 通过 .net MVC 调用 Go 命令
- python - windows 10 python shell命令安装返回错误
- report - 如何从已发布的 Power BI 报表中导出数据?
- php - PHP将检查转换为使用三元运算符
- wordpress - WordPress RSS 提要显示错误的 lastBuildDate
- python - 从不同页面获取元素时如何避免 StaleElementReferenceError?
- c# - ASP.NET 多层应用迁移到 ASP.NET Core
- javascript - 如何将一个对象数组转换为另一个对象数组?