Sardor Dushamov
Sardor Dushamov

Reputation: 1667

Arabic number shows incorrect

I am working with Arabic Text. I use Arabic Reshaper, reshaper doesn't show normally numbers. can you help us about this problem enter image description here

I use this reshaper

            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()));

Upvotes: 2

Views: 596

Answers (1)

Faxriddin
Faxriddin

Reputation: 81

I found this:

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

Where string1 and string2 are strings in a RtL language.

Upvotes: 4

Related Questions