I am little confused regarding usage of below attributes.
> android:layout_marginRight and android:layout_marginEnd
> android:layout_marginLeft and android:layout_marginStart
> android:layout_toLeftOf and android:layout_toStartOf
> android:layout_toRightOf and android:layout_toEndOf
> android:layout_gravity="right|end"
> android:layout_gravity="left|start"
Below are the some of facts which i have mentioned.Please correct me if i am wrong.
To support both Ltr and Rtl layouts and to support versions prior to api level 17 is it advisable to put the above attributes always in pairs..
The "start" and "end" concepts were added in API Level 17 and will
take precedence for Ltr device with api level>=17 and "right" and "left" concepts will take precedence for Ltr device with api level<17If our app minskdversion is >=17 then we can ignore "right" and
"left" attributes and use "start" and "end" attributes only- The "start" and "end" concepts will take precedence in all Rtl devices
Also I would like to know if there is any adverse effect in terms of performance/optimization if i add above attributes in pairs like-
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|end"
android:layout_marginRight="@dimen/dp10"
android:layout_marginEnd="@dimen/dp10"
android:layout_marginLeft="@dimen/dp10"
android:layout_marginStart="@dimen/dp10"
android:layout_toLeftOf="@+id/bar"
android:layout_toStartOf="@+id/bar"
/>