How to show Hindi text in android?

我的未来我决定 提交于 2019-11-29 04:47:35

Switch your text encoding to UTF-8.

In Eclipse go to Window -> Preferences, select General -> Workspace. From the Text file encoding dropdown, select UTF-8.

Gkapoor

Thanks i found the solution...

  1. create an array under the value folder
  2. Use the font that support Hindi under the assets folder
  3. textview.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/Hindi.ttf")); its working fine...

You need UTF-8 encoding, not Cp1252, and Unicode.

Naresh Sharma

Thanks i found the solution...

  1. Create an array under the value folder

  2. Use the font that support Hindi under the assets folder

  3. textview.setTypeface(Typeface.createFromAsset(getAssets(),"fonts/Hindi.ttf"));

its working fine...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!