我正在处理阿拉伯语文本。
我用阿拉伯语整形器,
整形器通常不显示数字。
你能帮我们解决这个问题吗
我用整形器

            View v = inflater.inflate(R.layout.ebookfragment, container,false);
            Typeface typeface = Typeface.createFromAsset(getActivity().getAssets(),"pdms_islamicfont1.2.ttf");
            tv = (TextView ) v.findViewById(R.id.tv);
            tv.setTypeface(typeface);

            tv.setBackgroundColor(Color.WHITE);
    //        tv.setGravity(Gravity.RIGHT);
            tv.setTextColor(Color.BLACK);
            tv.setTextSize(textSize);

            Spanned spanned = Html.fromHtml("<p> ٣١  عَنْ أَبِي هُرَيْرَةَ  </p>");
            tv.setText(ArabicUtilities.reshape(spanned.toString()));

最佳答案

我发现这个:

String filename = 123.doc
String message = string1 + "\u202A" + fileName + "\u202C" + string2;

其中string1和string2是rtl语言中的字符串。

关于android - 阿拉伯数字显示不正确,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/13552675/

10-12 06:10