Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android ActionBar background (when app is collapsed/minimized)

Can't find how to set background color of ActionBar in collapsed state. In fullscreen/opened state it works well but in collapsed/minimized it always the same gray color (color of android theme i derive from).

I want it to look like in youtube app. enter image description hereenter image description here Please help me. Thank you beforehand.

like image 363
Roman M Avatar asked Feb 04 '15 18:02

Roman M


1 Answers

Solution found.

Just set color to android:colorPrimary property.

<style name="AppTheme" parent="@style/Theme.AppCompat.Light">
<item name="android:textColorPrimary" tools:targetApi="21">@color/white</item>
<item name="android:colorPrimary" tools:targetApi="21">@color/green_back</item>
<item name="android:colorPrimaryDark" tools:targetApi="21">@color/green_back_dark</item>
...
</style>
like image 118
Roman M Avatar answered Oct 02 '22 22:10

Roman M