Android design layout in Arabic interface disorder solution, android Arabic
(1) adding "android: supportsRtl = true" (2) to the application element of the AndroidManifest. xml declaration file.]
How to solve the problem that the layout of android idea is in Arabic
(1) Add "android: supportsRtl = true" to the element of the AndroidManifest. xml declaration file"
(2) modify the layout "left/right" layout attribute 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) The TextView is not right in a mix of characters or English only. For example, some English strings in the list are displayed on the left and translated on the right.
Find the layout file it defines
Replace wrap_content with match_parent.
Android: textDirection = "locale.
Code Control
String language = Locale. getDefault (). getLanguage ();
If (language. equals ("ar") "| language. equals (" fa ")){
TextView textview = (textview) view;
Textview. setGravity (Gravity. RIGHT );
(4) incorrect image orientation
You need to redesign these images and place them in the drawable-ldrtl-hdpi folder.