change action bar text color android studio code example

Example 1: how to change actionbar color in android programmatically

getSherlockActivity().getSupportActionBar().setBackgroundDrawable(new ColorDrawable(0xff00ACED));
mActionBar.setBackgroundDrawable(new ColorDrawable(0xff00DDED));
mActionBar.setDisplayShowTitleEnabled(false);
mActionBar.setDisplayShowTitleEnabled(true);

Example 2: set title color in support action bar android

ActionBar actionBar = getActionBar();
         actionBar.setTitle(Html
         .fromHtml("<font color='#ffffff'> Now playing </font>"));

Tags:

Java Example