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".
RelativeLayout is a view group that displays child views in relative positions. The position of each view can be specified as relative to sibling elements (such as to the left-of or below another view) or in positions relative to the parent RelativeLayout area (such as aligned to the bottom, left or center).
FrameLayout is designed to block out an area on the screen to display a single item. Generally, FrameLayout should be used to hold a single child view, because it can be difficult to organize child views in a way that's scalable to different screen sizes without the children overlapping each other.
A ConstraintLayout is a ViewGroup which allows you to position and size widgets in a flexible way. Note: ConstraintLayout is available as a support library that you can use on Android systems starting with API level 9 (Gingerbread). As such, we are planning on enriching its API and capabilities over time.
Note that padding goes completely around the content: there is padding on the top, bottom, right and left sides (which can be independent). Margins are the spaces outside the border, between the border and the other elements next to this view. In the image, the margin is the grey area outside the entire object.
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.
Some APIs were introduced to support languages that use a right to left reading direction e.g Arabic and Hebrew.
One of which is android:layout_marginStart
See the link for more info : http://developer.android.com/about/versions/android-4.2.html#RTL
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With