可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
I am working in android. I am designing an application which shows Hindi words in text view.
I am using this code.
I used font in my resourses like DroidHindi.ttf, DroidSansFallback.ttf etc. this is showing some words correctly like as So please suggest me what .ttf i should use so each word of Hindi show correctly.
回答1:
@Pushpendra I was having same problem with my testing device (HTC phone). But i tried same app on samsung android phone it works properly on it. So i think you should try your app on different device May be this will help you.
回答2:
Instead of .ttf file, use .otf file.
回答3:
you can use Unicode instead of direct value...
String str="&# 2367;&# 2342;&# 2357;&# 2381;&# 2351;&# 2366;";
continious no gap.
TextView txtview_name=(TextView)findViewById(R.id.textViewmyView); final Typeface customF = Typeface.createFromAsset(this.getAssets(), "Hindi-SARAL1.TTF"); txtview_name.setText(Html.fromHtml(""+str)); txtview_name.setTypeface(customF);
and you can also convert world to unicode via this site...http://mylanguages.org/converter.php&# 2342;