设置状态栏以及全局的颜色

一.在Application中设置样式:

     android:theme="@style/AppTheme"

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<!-- 设置编辑框光标的颜色默认颜色-->
<item name="colorAccent">@color/colorPrimaryDark</item>
<!-- 设置全局背景色-->
<item name="android:windowBackground">@color/colorAccent</item>
</style>

 

posted @ 2017-09-10 20:32  张亚楠  阅读(222)  评论(0编辑  收藏  举报