Android unable to change background color of ActionBar -
i'm trying change background color of actionbar, after referencing several other questions on site still can't solutions work.
styles.xml
<resources> <style name="apptheme" parent="theme.appcompat.light.darkactionbar"> <item name="actionbarstyle">@style/actionbar</item> <item name="android:windowactionbar">true</item> </style> <style name="actionbar" parent="widget.appcompat.actionbar.solid"> <item name="background">@color/light_blue_menu_bar</item> </style> </resources>
colors.xml
<resources> ... <color name="blue_semi_transparent_pressed">#80738ffe</color> <color name="light_blue_menu_bar">#87cefa</color> </resources>
manifest.xml
<application android:allowbackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:theme="@style/apptheme" >
however actionbar doesn't appear in of views. missing?
edit
the solution add styles.xml
<item name="android:windowactionbar">true</item>
<style name="apptheme" parent="@style/theme.appcompat.light.darkactionbar"> <item name="android:actionbarstyle">@style/actionbarstyle</item> <item name="actionbarstyle">@style/actionbarstyle</item> <item name="android:windowactionbar">true</item> </style> <style name="actionbarstyle" parent="widget.appcompat.actionbar"> <item name="background">@color/blue</item> <item name="android:background">@color/blue</item> </style>
Comments
Post a Comment