我正在开发一个以listview开头的应用程序。 我遇到了应用程序主题的设置问题。 材料设计可应用于Android 5.0及以上版本。所以,我创建了一个价值-21文件夹并创建styles.xml
如下:在5.0版本Android版应用主题
<resources>
<!-- Inherit from the light Material Theme -->
<style name="MyCustomTheme" parent="android:Theme.Material.Light">
<item name="android:colorPrimary">@color/My_LightBlue</item>
</style>
</resources>
在Android中这个主题并不适用,因为它无法读取值-21文件夹中。 我还必须在值标准文件夹中创建styles.xml
? 必须创建一个新主题来更改应用栏的颜色(这是我的目标)。
我有点迷茫...... 谢谢
可以使用设计支持库使用上较旧的Android版本的材料设计 - https://developer.android.com/topic/libraries/support-library/features.html#design – Okas