Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Arabic mirror of layout issue in Android

I am currently developing an application on Android platform with multi-language support (i.e., Arabic and English). I have prepared two value packages for English as well as Arabic.

I am using the same layouts for the different languages. In other words, I do not have special layouts for Arabic or English. I have used all possible ways i.e. layoutDirection, gravity, and layout_gravity attributes to get the layouts mirrored. so far, the best I have got that the controls are aligned to the right, but not mirrored.

My question is how to force the application layouts to be mirrored? To the purpose of knowledge, I have tried different Android platforms: 2.3.3 and 4.2.2 with no success. Please, could any one help me as I have searched deliberately to get my problem solved.

like image 398
Abdulkarim Kanaan Avatar asked Nov 02 '22 16:11

Abdulkarim Kanaan


1 Answers

How to set up RTL layout mirroring
To set up RTL layout mirroring in your app, perform the following steps: Add android:supportsRtl=”true” to the <application> element in your Android manifest file.
In the Android manifest file, change all of your app’s “left/right” layout properties to new “start/end” equivalents. For example, android:paddingLeft should become android:paddingStart.

just follow this link
http://developer.sonymobile.com/2015/06/09/enable-worldwide-usability-for-your-apps-with-bi-directional-language-support/

like image 89
atish naik Avatar answered Nov 11 '22 15:11

atish naik