How can I change the color of an ActionBar? I performed this and it works, but not the way I want. it changes color only after the start of activity, so immediately after launching the application the original hatching color is displayed, and only after a second my custom color does not spread. Is there any other way to handle this? thanks in advance
.... protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ActionBar actionBar; actionBar.setBackgroundDrawable(new ColorDrawable(Color.parseColor("#879f38"))); .....
source share