Skip to content
Search

Android:ActionBar

lastmod 2014-05-14created 2014-01-074 edits

How to change the color of the ActionBar Title Text

Use Html.fromHtml() as below and apply it to Activity.setTitle(CharSequence title).

final String openFontTag = "<font color='white'>";
final String title = getString(R.string.agree_terms_for_use_and_privacy_title);
final String closeFontTag = "</font>";
final String titleHtmlString = openFontTag + title + closeFontTag;
setTitle(Html.fromHtml(titleHtmlString));

Favorite site