(1) Adding "Android:supportsrtl=true" (2) to the application element of the Androidmanifest.xml declaration file]
Androidの design Layout in Arabic under the interface Confusion solution
(1) in the element of the Androidmanifest.xml declaration file, add "Android:supportsrtl=true"
(2) Modify the "Left/right" layout property of layout in the application to the corresponding "Start/end" layout
Paddingstart paddingend layout_marginstart layout_marginend layout_alignparentstart layout_alignParentEnd
Replace
Paddingleft paddingright layout_marginleft layout_marginright layout_alignparentleft layout_alignParentRight
(3) Mixed characters or plain English, TextView does not reside right. For example, some of the English characters in the list are displayed on the left, and the translated ones are displayed on the right.
Locate the layout file for which it is defined
Replace Wrap_content with match_parent, if no effect is added after replacement
android:textdirection= the "locale" attribute.
Code control
String language = Locale.getdefault (). GetLanguage ();
if (Language.equals ("ar") "|language.equals (" FA ")) {
TextView TextView = (TextView) view;
Textview.setgravity (Gravity.right);
(4) For some problems with the wrong orientation of the picture
For these images you need to follow the redesign and then drop them into the drawable-ldrtl-hdpi folder
Android design Layout in Arabic under the interface of the confusion solution