What is android:layout_marginStart

null picture null · Sep 19, 2014 · Viewed 18.9k times · Source

I would like to add some space between the left display border and an ImageView. Android SDK made me aware of "android:layout_marginStart".

Consider adding android:layout_marginStart="10dp" to better support right-to-left layouts

Why should I use android:layout_marginStart="10dp" instead of android:layout_marginLeft="10dp"? I have never done so and never encountered any problems with so-called "right-to-left layouts".

Answer

CommonsWare picture CommonsWare · Sep 19, 2014

start and end are the same as left and right for left-to-right (LTR) languages. For right-to-left (RTL) languages (Arabic, Hebrew, etc.), start and end reverse and become equivalent to right and left, respectively.

This Android Developers Blog post gets into a bit more detail.