【发布时间】:2016-04-18 15:03:51
【问题描述】:
如何为整个应用维护自定义字体。而不是从 Android 中的资产加载文件。比如下图
TextView tv =(TextView)findViewById(R.id.textview1);
Typeface type =Typeface.createfromAssets(this,"custom.ttf");
tv.setTypeface(type);
【问题讨论】:
-
Google 搜索在您所在的位置不起作用?我发现了几个使用以下搜索词的骗子:自定义字体应用程序 android。我想知道你为什么不这样做......哦,好吧。
-
请确保您只实例化一次
Typeface...创建Typeface需要时间。
标签: android