I need to change Contextual Action Bar color programmatically. How to do it in the style I know. Thank you in advance
Asked
Active
Viewed 406 times
0
-
1Possible duplicate of [how to Customize the Contextual Action Bar using appCompat in material design](http://stackoverflow.com/questions/27458421/how-to-customize-the-contextual-action-bar-using-appcompat-in-material-design) – Ajay Pandya Feb 27 '16 at 09:23
1 Answers
-1
Use the code
getActionBar().setBackgroundDrawable( <create a background drawable with solid rectangle and color as what you want>);
if you are using support library then try with
getSupportActionBar().setBackgroundDrawable(<create a background drawable with solid rectangle and color as what you want>);

Ragesh Ramesh
- 3,470
- 2
- 14
- 20