Differences between marginleft and marginstart based on Android (detailed explanation)

When we write the layout, we will find several similar properties:

MarginStart MarginLeft

MarginEnd MarginRight

What are the differences between these attributes? According to the API comments, we know that marginstart refers to the distance between the control and the view at the beginning, and marginleft refers to the distance between the control and the view on the left. Marginend and marginright are the same.

Generally, the beginning of view is on the left, but some languages are still written from right to left, such as Arabic. After Android 4.2 system, Google introduced RTL layout in Android to better support the display of text layout from right to left. In order to be more compatible with RTL layout, Google recommends using marginstart and marginend instead of marginleft and marginright, so that the application can maintain a consistent user experience on the normal screen and the screen displaying text from right to left.

The difference between the above article based on Android marginleft and marginstart (detailed explanation) is all the content shared by Xiaobian. I hope it can give you a reference and support more programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>