【问题标题】:set two or more typeface in textview string android在textview字符串android中设置两个或多个字体
【发布时间】:2018-01-25 00:18:46
【问题描述】:

我有两种字体:

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

【问题讨论】:

标签: android listview textview android-studio-3.0 android-typeface


【解决方案1】:

您可以使用“SpannableString”,查看这里:

1.SpannableString example 2.How set Spannable object font with custom font

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-03-24
    • 2015-07-08
    • 2015-12-22
    相关资源
    最近更新 更多