设置Specifc字体独立于设备的一个TextView [英] Set Specifc Font to a TextView independent to device
问题描述
我想设置自定义字体的TextView的,但字体应为设备设置的独立。因为我已经用下面的code:
I want to set a custom font to the textView but the font should be device setting's independent. As i have used the Below Code:
TextView tv=(TextView)findViewById(R.id.custom);
Typeface face=Typeface.createFromAsset(getAssets(), "fonts/HandmadeTypewriter.ttf");
tv.setTypeface(face);
但仍字体是由我的三星Galaxy S3设置之一。 我想设置一个自定义的字体是独立于设备的字体设置。
but still the font is the one that is set by the on my samsung galaxy s3. I want to set a custom font that is independent to the device's font settings.
我已经通过以下链接了,并尝试的事情,但都没有成功,但结果。
I have gone through following links and have tried the things but have not succeeded with results.
<一个href="http://stackoverflow.com/questions/19268421/how-to-$p$pvent-textview-font-changing-when-we-change-the-device-font-style-in-s">Link 2
请帮忙。
推荐答案
刚刚清理项目一定会完成。
Just clean the project it will be done.
这篇关于设置Specifc字体独立于设备的一个TextView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!