Displaying non-English (specifically Hindi) characters on Android device

自闭症网瘾萝莉.ら 提交于 2019-11-28 01:41:26

Try this ::

here i have set hindi font in my textview. you can copy file in assets folder and apply following code :

Typeface face;
face = Typeface.createFromAsset(this.getAssets(), "fonts/hindi.TTF");
tran_banner = (TextView) findViewById(R.id.tran_banner);
            tran_banner.setTypeface(face, Typeface.BOLD);

I don't believe that the default fonts on Android devices contain hindi characters. You'll need to package up a hindi font with your app and use that.

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