0

I'm trying to retrieve Arabic words that I stored in a text file and display them in my android application, any idea on how to display Arabic letters or words in my app? I've tried different kinds of methods like using the ArabicReshaper and this is an example of the code:

tx=(TextView)this.findViewById(R.id.tt);

    try{
        tx.setTypeface(Typeface.createFromAsset(getAssets(),"dejavusans.ttf"));
        tx.setText(ArabicUtilities.reshape("\u0641\u0631\u0633"));//

    }

but I need another way instead of using the Unicode for each Arabic letter and connecting them. Can I not write the Arabic word directly into eclipse?

u_kami
  • 565
  • 12
  • 28
  • yes u can write directly. have you aware of Locale class – Narendra Pal Aug 12 '12 at 10:29
  • check this link http://stackoverflow.com/a/11878531/1395259 – Narendra Pal Aug 12 '12 at 10:44
  • thank you but I don't mean the locale. I found a solution from this link http://stackoverflow.com/questions/7962704/how-to-support-arabic-text-in-android/7962813#7962813 but it does not work if I want to try writing an array of strings and then convert it to Arabic text – u_kami Aug 13 '12 at 11:14
  • 1
    Same problem I was also facing with that solution. Then I tried Locale class and set the typeface to the locale. And the key point is (I am not 100% sure) that to populate this font, you need to have custom ListView, spinner,widgets etc.. – Narendra Pal Aug 13 '12 at 12:24

0 Answers0