[英]urdu text is being shown letter by letter in my android emulator
I am having difficulty to show a complete word of urdu..my code is showing urdu text letter by letter in my android emulator. 我很难显示urdu的完整单词。我的代码在我的android仿真器中逐个字母显示urdu文本。 kindly guide me how to read Urdu. 请指导我阅读乌尔都语。 I have already set the URDU Font.thanks 我已经设置了URDU Font.thanks
Get a font file like "urdu.ttf" Drop it in your asset folder, inside a "fonts" folder Get a reference of TextView with something like that : 获取类似“ urdu.ttf”的字体文件,将其放在您的资产文件夹中的“ fonts”文件夹中。
TextView tv = (TextView) findViewById(R.id.myCustomTVFont);
Grab you font from the asset folder : 从素材资源文件夹中获取字体:
Typeface tf = Typeface.createFromAsset(getAssets(), "fonts/urdu.ttf");
Make your TextView look great : 使您的TextView看起来很棒:
tv.setTypeface(tf);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.