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

后端 未结 2 1770
忘掉有多难
忘掉有多难 2020-12-06 23:33

I have some Hindi text which is not getting displayed on the virtual device. The text is properly displayed in eclipse, and the files are utf-8 encoded.

E.g. I have

相关标签:
2条回答
  • 2020-12-07 00:14

    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);
    
    0 讨论(0)
  • 2020-12-07 00:25

    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.

    0 讨论(0)
提交回复
热议问题