Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@BindingAdapter({"bind:font"})
public static void setFont(TextView textView, String fontName) {
Typeface typeface = Typeface.createFromAsset(context.getAssets(), "fonts/" + fontName);
textView.setTypeface(typeface);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment