android - How to change color of a specific acitonbar item -


i trying design actionbar (android version >=2.3 using support v7). want color of specific button different other buttons.

is there simple way ? example design below

enter image description here

you can activity class

in oncreate() method of activity add these lines , necessary imports.

        android.app.actionbar bar = getactionbar();         bar.setbackgrounddrawable(new colordrawable(color.parsecolor("#d44334"))); 

it works in support action bar well.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -