Android Textview English + Arabic

Viewed 167

I have a normal Textview which contains both Arabic and English texts.

Below is the original text

"unit_label_text": "محتوى 0.4kg (€ 10.00 / 1Kg)",

When I try to paste it inside of xml it's like the below and the mobile app itself showing the same.

enter image description here

Note: When the device language is English it's working fine. But if I changed the device language to Arabic. It's not working,

1 Answers

When you use the Arabic language the app automatically uses the RTL format so you can consider disabling the RTL (Right to Left) format for your app.

In your manifest file and inside the application tag add these two lines.

<manifest>
<application
    .
    .
    .
    android:supportsRtl="false"
    tools:replace="android:supportsRtl"
    >
</application>

Or else try removing this code from your XML

android:layoutDirection="rtl"
Related