轉(zhuǎn)載請(qǐng)注明本文出自woochen123的博客(http://blog.csdn.net/chewu1590/article/details/54881257),請(qǐng)尊重他人的辛勤勞動(dòng)成果,謝謝!
實(shí)現(xiàn):
在最新的5.0中,google似乎不推薦使用Material Design主題了,而是由AppCompat代替。
1. <resources>
2.
3. <!-- Base application theme. -->
4. <style name="APPTheme" parent="Theme.AppCompat.Light.DarkActionBar">
5. <!-- Customize your theme here. -->
6. <item name="colorPRimary">@color/colorPrimary</item>
7. <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
8. <item name="colorAccent">@color/colorAccent</item>
9. </style>
10.
11. </resources>
注意事項(xiàng):
1.系統(tǒng)默認(rèn)控件自帶波紋效果
2.非默認(rèn)控件實(shí)現(xiàn):
android:background="?android:attr/selectableItemBackground"波紋有邊界
android:background="?android:attr/selectableItemBackgroundBorderless"波紋超出邊界
配色方案一(代碼):
android:colorControlHighlight:設(shè)置波紋顏色
android:colorAccent:設(shè)置checkbox等控件的選中顏色
statusBarColor:設(shè)置狀態(tài)欄的顏色
配色方案二(Android Studio):
Tools-Android-themeEditor
更多信息敬請(qǐng)關(guān)注微信:
新聞熱點(diǎn)
疑難解答
圖片精選
網(wǎng)友關(guān)注