0

My min api level is 8. I am using app combat themes. So doing extends activity in every .java file.

Does anyone know how to change the background color of the actionbar when opening a new activity?

pmk92
  • 11

1 Answers1

0

Use this code in your activities:

ActionBar ab = getActionBar(); 
ColorDrawable colorDrawable = new ColorDrawable(Color.parseColor("#81a3d0"));     
ab.setBackgroundDrawable(colorDrawable);

see here and here.

Community
  • 1
  • 1
Mohammed Ali
  • 2,758
  • 5
  • 23
  • 41