1
for versions from API 21 you could set the status bar color as follows: Configure your app theme:
<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>
<item name="android:statusBarColor">@drawable/statusbar_degrade</item>
</style>
And the Drawable file that will generate the color set for your gradient:
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<gradient android:centerColor="#3046d7"
android:startColor="#58d445"
android:endColor="#1b8f0b" />
</shape>
</item>
</selector>
Then you can set the colors and gradient format inside the statusbar_degrade file you created in the @drawable folder.
I managed to do this part, but I could not apply it to the activitys! @Eduardorafael
– Alberto Bezerra