Saturday 15 January 2011

android - Action bar Background Color Not Changing -



android - Action bar Background Color Not Changing -

i have style file setting action bar style this

<style name="actionbar.solid.pro" parent="@style/widget.sherlock.actionbar.solid"> <item name="background">@color/dialer_color</item> <item name="backgroundstacked">@color/dialer_color</item> <item name="backgroundsplit">@color/dialer_color</item> <item name="android:progressbarstyle">@style/progressbar.pro</item> </style>

now want alter color of action bar programmatically this`

getsupportactionbar.setbackgrounddrawable(new colordrawable(color.red));

but not have effect. can please tell me why , doing wrong

is possible alter actionbar.tabview background programatically ? setting style this, how can alter background of style attribute ?

<style name="actionbartabstyle.pro" parent="@style/widget.sherlock.actionbar.tabview"> <item name="android:background">@color/dialer_color</item> </style>

see can refer android action bar style generator makes work of customising action bar much easier advice you must have on link certainly help you

http://jgilfelt.github.io/android-actionbarstylegenerator/#name=example&compat=holo&theme=light&actionbarstyle=solid&texture=0&hairline=0&neutralpressed=1&backcolor=e4e4e4%2c100&secondarycolor=d6d6d6%2c100&tabcolor=33b5e5%2c100&tertiarycolor=f2f2f2%2c100&accentcolor=33b5e5%2c100&cabbackcolor=ffffff%2c100&cabhighlightcolor=33b5e5%2c100

and 1 more thing when done specifying colors receive set of images in archive i.e. .zip format must extract them in respective folders or directories in directory naming "res"

android

No comments:

Post a Comment