Display different languages in set in TextView.

被刻印的时光 ゝ 提交于 2020-01-24 09:51:18

问题


I have some string in different languages like this :

    String aa = " أهلاً و سهلاً"; // arbic
    String arr = "आपका स्वागत है";// hindi
    String str1 = "Tübingen systemportefølje";
    Strings tr2 = "Das ist nicht Englisch"; 
    String str3 = "這是不是英語"; // chinese

i want to set these string in text view .i try in this way :

try {
            final String s = new String(arr.getBytes(), "UTF-8");
            abc.setText(Html.fromHtml(s));
        } catch (UnsupportedEncodingException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

and also try by adding font respective languages and set view . i only want to set this languages in textview. please give me a hint.

来源:https://stackoverflow.com/questions/15462171/display-different-languages-in-set-in-textview

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