I like to know if
app:layout_constraintStart_toStartOf=""
is better than
app:layout_constraintLeft_toLeftOf=""
or Android recommend use anyone.
Thanks!
Well what's your use-case?
In Android, the start dimension was added in I think Lollipop. It basically adds support for RTL languages. For much of the world, LTR is the default layout, and so start and left are the same thing.
However, there are also quite a few languages that are read RTL, such as Arabic. The point of start is to make these languages display better in your app (assuming you have translations implemented) and line up properly with the text.
If your app is only going to be used on, say, devices with the English language, left is perfectly fine for now. If you want to make a general-audience app, and support RTL languages, you should use start to avoid wonky layouts.
It usually depends on your API version.
The two attributes work hand in hand. But theoretically speaking, start and end are better to use first, if your API level is greater than 16. Left and Right are not necessary when the API is greater than 16.
But if the API is less than 17, then it is more advisable to use "Left" and "Right", because they can function completely without any additional the "Start" and "End".
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