2018年2月4日 星期日

Change the color of status bar and icon/text

Reference:

https://developer.android.com/training/material/theme.html
https://solinariwu.blogspot.tw/2017/05/android-status-bar.html

Code snippet:

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize the status bar color -->    <item name="android:statusBarColor">@color/status_bar_color</item>
    <!-- If set, the status bar will be drawn such that it is compatible with a light status bar background -->    <item name="android:windowLightStatusBar">true</item>
</style>

沒有留言: