自定义字体在查看传呼机的机器人 [英] Custom Font in View Pager in android
本文介绍了自定义字体在查看传呼机的机器人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我开发的演示应用程序中,我使用的视图寻呼机。现在我想知道,我们可以改变标题的文本样式显示在视图寻呼机。
I am developing demo application in which I am using view pager. Now I want to know that can we change the text style of Title displayed in view pager.
请它给你的建议。
请多关照。
推荐答案
工作演示
TextView txt = (TextView) v.findViewById(R.id.custom_font);
,然后改变您的字体
and then change your font
事情是这样的:
switch (position) {
case 0:
v = (LinearLayout) LayoutInflater.from(cxt).inflate(R.layout.lcmeter, null);
TextView txt = (TextView) v.findViewById(R.id.custom_font);
Typeface font = Typeface.createFromAsset(getAssets(), "Chantelli_Antiqua.ttf");
txt.setTypeface(font);
break;
}
这篇关于自定义字体在查看传呼机的机器人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文