The difference between Android MarginLeft and Marginstart

Source: Internet
Author: User

As
We write layout layouts, we find that there are several similar properties:
Marginstart marginleft

Marginend marginright


What are the differences between these attributes? Gaze on the API. We learned that Marginstart refers to the size of the control's distance from the View section at the beginning. MarginLeft refers to the distance between the control and the left view portion, Marginend and marginright.


under normal circumstances, the view opening section is left. But some languages are now written in the right-to-left order, such as Arabic, after the Android 4.2 system. Google introduced RTL layout in Android, better support the display of right-to-left text layout, in order to better compatible with RTL layout, Google recommends using Marginstart and marginend instead of MarginLeft and MarginRight, which will allow the app to maintain a consistent user experience on both a normal screen and a screen that displays text from right to left.

The following is an excerpt from the Chinese Android 4.2API, which is translated by others:
    Android 4.2 introduces a full local support layout for right-to-left text. With local RTL support, you can create the perfect app experience for all users, whether they're written in a left-to-right or right-to-left direction. When the user switches the system language to right-to-left notation, the system provides its own active application UI layout and mirroring of all visual components, including the display and input of the text elements. Your app can support RTL layout mirroring with minimal changes. Assuming your app supports this feature, simply change all the "left/right" layout properties to the corresponding "Start/end" in your app's manifest file. The system will be based on the need to process your UI.                

The difference between Android MarginLeft and Marginstart

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.