在文本视图字符串中设置两个或多个字体 android
set two or more typeface in textview string android
我有两种字体:
Typeface typeface_font_arabic = Typeface.createFromAsset(context.getAssets(), "arial.ttf");
Typeface typeface_font_number = Typeface.createFromAsset(context.getAssets(), "aclonica.ttf");
如何在字符串 TextView 中使用不同的字体 android ?
这是我在 android
中的代码
示例:
enter image description here
您可以使用 "SpannableString",请在此处查看:
我有两种字体:
Typeface typeface_font_arabic = Typeface.createFromAsset(context.getAssets(), "arial.ttf");
Typeface typeface_font_number = Typeface.createFromAsset(context.getAssets(), "aclonica.ttf");
如何在字符串 TextView 中使用不同的字体 android ?
这是我在 android
中的代码示例: enter image description here
您可以使用 "SpannableString",请在此处查看: