android:layout_alignParentStart="true"
Aligns the start edge of this view to the start edge of its parent. This is the left edge for LTR (left to right) locales and the right one on RTL (right to left) locale languages like Arabic, Hebrew, Persian etc.
The reason Android Studio also adds
android:layout_alignParentLeft="true"
to your views is to support older platforms that came before 4.2.x Jelly Bean
. The Start/End attributes like layout_alignParentStart
are only available from API 17 onwards. The newer platforms fallback to Left/Right attributes only if the corresponding Start/End attributes are not found.
In case, your application supports legacy platforms using android:minSdkVersion
below level 17
you must always provide Left/Right attributes for your views. Otherwise the project won't compile with an error message like
To support older versions than API 17 (project specifies 7)
you should also add android:layout_alignParentLeft="true"
Also note that your Android application needs to declare its support for RTL locales within your AndroidManifest.xml
as well.
<application
...
android:supportsRtl="true"
/>