开发者

TextAppearanceSpan with custom fonts

开发者 https://www.devze.com 2023-03-23 00:36 出处:网络
Is it possible to create a TextAppearanceSpan, which takes font family name as String, but use a custom font. I know how to c开发者_高级运维reate a TypeFace from a file with Typeface.createFromAsset()

Is it possible to create a TextAppearanceSpan, which takes font family name as String, but use a custom font. I know how to c开发者_高级运维reate a TypeFace from a file with Typeface.createFromAsset(), but it isn't helping.


People seem to still have trouble with this so here you go: This is how it was accomplished for TypefaceSpan, overriding for TextAppearanceSpan is just a tad more code.

0

精彩评论

暂无评论...
验证码 换一张
取 消