Thursday, 15 January 2015

xml - Android: Changing the colour of the action bar -


I had set my window background color white in white and now I'm just trying to change the color of the action bar To make it green, this is my XML code:

  & lt; Style name = "Custom Aaptimo 2" parent = "Android: widget.Holo.light" & gt; & Lt; Item name = "android: windowBackground" & gt; @color / white & lt; / Item & gt; & Lt; Item name = "Android: Background" & gt; @color / green & lt; / Item & gt; & Lt; Item name = "Android: icon" & gt; @Android: Color / Transparent & lt; / Item & gt; & Lt; / Style & gt;  

The problem is that using Android: Background to change the color of the action bar, it overflows and the color of the whole screen turns to green, it gives me a clear green action bar and Below this is a white window. thank you in advanced!

  & lt ;! - Base app theme - & gt; & Lt; Style name = "Aaptim" parent = "@ style / custom-actionbirth theme" & gt; & Lt ;! - Customize your subject here - & gt; & Lt; / Style & gt; & Lt ;! - Topics applicable to the application or activity - & gt; & Lt; Style name = "custom actionbeartheme" parent = "@ style / theme.AppCompat.Light.DarkActionBar" & gt; & Lt ;! - Support library compatibility - & gt; & Lt; Item name = "Android: Actionbarstyle" & gt; @ Style / myactionbar & lt; / Item & gt; & Lt ;! - Support library compatibility - & gt; & Lt; Item name = "Action bell style" & gt; @ Style / myactionbar & lt; / Item & gt; & Lt; / Style & gt; & Lt ;! - Action style - & gt; & Lt; Style name = "myactionbar" original = "@ style / widget. AppCompat.Light.ActionBar.Solid.Inverse" & gt; & Lt; Item name = "Android: Background" & gt; @drawable / top_bar_blue & lt; / Item & gt; & Lt ;! - Support library compatibility - & gt; & Lt; Item name = "background" & gt; @drawable / top_bar_blue & lt; / Item & gt; & Lt; Item name = "title text style" & gt; @ Style / mytheme.ActionBar.Text & lt; / Item & gt; & Lt; / Style & gt; & Lt ;! - Actionbar text - & gt; & Lt; Style name = "mytheme.ActionBar.Text" Parent = "TextAppearance.AppCompat.Widget.ActionBar.Title" & gt; & Lt; Item name = "android: textcolor" & gt; @Android: color / white & lt; / Item & gt; & Lt; Item name = "Android: text size" & gt; 20sp & lt; / Item & gt; & Lt; Item name = "Android: Text Style" & gt; Bold & lt; / Item & gt; & Lt; Item name = "android: fontFamily" & gt; Without-SerifBold & lt; / Item & gt; & Lt; / Style & gt; & Lt ;! - in manifest - & gt; Android: Theme = "@Style / Aaptim"  

No comments:

Post a Comment