2011-12-27 229 views
2

我需要在Android中打印以下字符串,該字符串在阿拉伯文中爲TextView。它的打印效果很好,但是當阿拉伯文字和數字落在同一個字符串中時,Android會將數字放在最後!當阿拉伯文字帶有數字時,阿拉伯文字顯示爲反向

這裏是我的代碼

String str = "مقر 44"; 
TextView textView = (TextView)findViewById(R.id.test); 
textView.setText(str); 

這裏是輸出

enter image description here

回答

0

你可以用這個解決辦法

String str = "44 "+"مقر "; 
     TextView textView = (TextView)findViewById(R.id.txt_title); 
     textView.setText(str); 

enter image description here

嘗試

其最終放置數字的不是Android,它因阿拉伯文編寫標準