2012-11-25 125 views
2

我正在使用阿拉伯文字。 我使用阿拉伯文Reshaper, reshaper不顯示正常數字。 可以幫助我們對這個問題 enter image description here阿拉伯數字顯示不正確

我用this整形

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

[FAQ](http://stackoverflow.com/faq#dontask) – keyser

+1

請顯示您所寫的代碼,而不是其中大多數不相關的巨大圖像。 – bmargulies

+3

我有同樣的問題,如何解決它? –

回答

4

我發現這一點:

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

如果字符串1和字符串是在一個RTL語言字符串。