how to set the background color of the status bar during the launching phase [duplicate]

The Easiest Way is :got to res -> value -> styles and add this

1: Add this in your color xml file

<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#000000</color>
<color name="colorAccent">#FF4081</color>

2:Add this in your styles.xml file

  <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>


  1. colorprimary is for Actionbar
  2. colorPrimaryDark is for Statusbar
  3. your can change these colors and u could get ur required result .


Leave a Comment