Skip to content

Instantly share code, notes, and snippets.

@le0nidas
Created January 16, 2022 09:52
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save le0nidas/c8a39dcdaa79e2e7e0c8b235c31cf37a to your computer and use it in GitHub Desktop.
// TextAppearanceSpan:
public TextAppearanceSpan(Context context, int appearance, int colorList) {
// ...
mTypeface = a.getFont(com.android.internal.R.styleable.TextAppearance_fontFamily)
// ...
}
// TypedArray:
public Typeface getFont(@StyleableRes int index) {
// ...
return mResources.getFont(value, value.resourceId);
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment