Android design layout in Arabic interface disorder solution, android Arabic

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.