johannilsson / android-actionbar

DEPRECATED Android Action Bar Implementation
1.31k stars 564 forks source link

Action background does not change #58

Open ecunal opened 12 years ago

ecunal commented 12 years ago

Hi, I was using a custom background for ActionBar but when I add a custom action to my ActionBar like

actionBar.addAction(new FinishTagging());

where FinishTagging implements Action, the background of the area where the icon of this activity is shown still looks like the default one (which is red) even if I explicitly change it after the adding the activity with the statement below:

actionBar.setBackgroundColor(getResources().getColor(R.color.titlebackgroundcolor));

I wonder is it a known issue or is it just my fault?

Thanks in advance.

johannilsson commented 12 years ago

There's limited support for changing the colors at runtime. My suggestion is that you instead change the colors using a theme.

ecunal commented 12 years ago

I'm already changing the background color through xml file, I use the following style for ActionBar:

`