Created
November 30, 2017 22:19
-
-
Save rdelrosario/b1bdab144207c2751219bad758653a61 to your computer and use it in GitHub Desktop.
Android - Text Font
This file contains hidden or 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
void UpdateToolbarTextFont(Android.Widget.TextView textView, Font customFont, Typeface originalFont) | |
{ | |
if (customFont != null) | |
{ | |
textView.Typeface =customFont.ToTypeface(); | |
float tValue = customFont.ToScaledPixel(); | |
textView.SetTextSize(ComplexUnitType.Sp, tValue); | |
} | |
else | |
{ | |
textView.Typeface = originalFont; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment