I want to change the color of the Action Bar background when the user chooses a selection in the Navigation List.
Currently, my code looks like this:
Try this:
myActivity.invalidateOptionsMenu();
Try using this code:
ColorDrawable colorDrawable = new ColorDrawable(Color.parseColor("#ffFEBB31"));
actionBar.setBackgroundDrawable(colorDrawable);
I was having this same problem.
For Xamarin Users in Visual Studio or the like.
Please paste this just after the SetContentView(Resource.Layou...... in the activity class.
// Setting ActionBar (Toolbar) background color natively
var actionBar = this.ActionBar;
actionBar.SetBackgroundDrawable(new ColorDrawable(Color.Black));
You may change it as you deem necessary of do more on the actionBar variable.
Thanks hope this helps.