简体   繁体   中英

Changing android actionbar background not working

ActionBar actionBar = getSupportActionBar();
actionBar.setBackgroundDrawable(new ColorDrawable(Color.parseColor("#330000ff")));
actionBar.setStackedBackgroundDrawable(new ColorDrawable(Color.parseColor("#550000ff")));

I'm trying to change my actionbar and the tab backgrounds, using the code above, the actionbar background changes perfectly but the tab backgrounds doesn't change at all, I'd like to know if this is due to the fact that I use supportActionBar or not, if anyone has a solution, Thanks!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM