Created
August 25, 2016 06:45
-
-
Save iammert/588027190c022883cba3bfc14b4e0dbf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@BindingAdapter({"bind:font"}) | |
public static void setFont(TextView textView, String fontName) { | |
textView.setTypeface(Typeface.createFromAsset(textView.getContext().getAssets(), "fonts/" + fontName)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment