【问题标题】:Set Specifc Font to a TextView independent to device将特定字体设置为独立于设备的 TextView
【发布时间】:2013-12-10 16:59:19
【问题描述】:

我想为 textView 设置自定义字体,但字体应该是设备设置独立的。因为我使用了以下代码:

 TextView tv=(TextView)findViewById(R.id.custom); 
  Typeface face=Typeface.createFromAsset(getAssets(), "fonts/HandmadeTypewriter.ttf"); 
  tv.setTypeface(face); 

但字体仍然是我的三星 Galaxy s3 上设置的字体。 我想设置一个独立于设备字体设置的自定义字体。

我浏览了以下链接并尝试了这些东西,但没有成功。

Link 1

Link 2

请帮忙。

【问题讨论】:

    标签: android fonts typeface


    【解决方案1】:

    只需清理项目即可。

    【讨论】:

    • 感谢 Saurabh,已经完成了,但我还需要知道如何在应用程序级别将自定义字体设置为 textview。
    猜你喜欢
    • 2013-11-17
    • 1970-01-01
    • 1970-01-01
    • 2020-03-27
    • 2018-02-10
    • 2021-10-29
    • 2013-08-23
    • 2020-03-01
    • 2022-11-19
    相关资源
    最近更新 更多