ibad ur rahman
ibad ur rahman

Reputation: 1411

How to show arabic text in android?

I want to show Arabic text from text file in android. in some phones and tablets it seems to be correct, but on some android devices it looks like the below text:

ا ل س ل ا م     ع ل ي ك م

Please help me how to show them correctly on every device.

Upvotes: 2

Views: 1432

Answers (2)

Nik Reiman
Nik Reiman

Reputation: 40430

I assume that the problem here is that the text is not shown right-to-left. You should try using the Bidi class, or by specifying the following in your XML:

<EditText android:layout_width="match_parent" android:layout_height="wrap_content"android:id="@+id/editText1" android:gravity="right">/EditText>

Upvotes: 3

viks
viks

Reputation: 404

Copy the ttf file to the assets folder in your android project folder..Then set the typeface of the textview in the code.

Upvotes: 1

Related Questions