Skip to content

Instantly share code, notes, and snippets.

@surajsau
Last active August 6, 2020 16:38
Show Gist options
  • Save surajsau/3b624a02e814e0347fbf01ba006f397b to your computer and use it in GitHub Desktop.
Save surajsau/3b624a02e814e0347fbf01ba006f397b to your computer and use it in GitHub Desktop.
Toolbar.setTitleTextAppearance implementation in AOSP
/**
* Sets the text color, size, style, hint color, and highlight color
* from the specified TextAppearance resource.
*/
public void setTitleTextAppearance(Context context, @StyleRes int resId) {
mTitleTextAppearance = resId;
if (mTitleTextView != null) {
mTitleTextView.setTextAppearance(context, resId);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment