When writing layout layouts, we find that there are several more similar properties:
Marginstart marginleft
Marginend marginright
What are the differences between these attributes? According to the API note, we know that Marginstart refers to the distance between the control and the view portion of the beginning, and marginleft refers to the distance between the control and the left view. Marginend and MarginRight.
In general, the view begins with the left, but some languages are now written in the right-to-left order, such as in Arabic, after the Android 4.2 system, Google introduced RTL layouts in Android. Better supported by right-to-left text layout display, in order to better compatible with RTL layout, Google recommends using Marginstart and marginend to replace MarginLeft and MarginRight, This allows 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 that others have translated:
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 an automatic application UI layout and mirroring of all visual components, including the display and input of text elements. Your app can support RTL layout mirroring with minimal changes. If 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 process your UI as needed.
The difference between Android MarginLeft and Marginstart