我正在開發一個以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