0

Why when I add any widget and perform alignment operations on it, two options are automatically added, for example:

android:layout_alignParentEnd="true"

android:layout_alignParentRight="true"

When using a version older than API 17 I should use:

android:layout_alignParentRight="true" or

android:layout_alignParentLeft="true"

Is there any way that only one option appears, not two? So you don't have to delete it manually? Or maybe you can leave both options and it doesn't matter?

UnknownBoy
  • 169
  • 7

1 Answers1

1

There is a similar question HERE that explains the differences between

android:layout_alignParentLeft="true"
android:layout_alignParentStart="true

In summary, layout_alignParentEnd="true" and android:layout_alignParentRight="true" are equivalent when the layout direction is left-to-right. They will be opposite to each other if the direction is right-to-left. By default the layout direction is based on the language, but it is possible to override it. For a language like English both statements accomplish the same result, so it's harmless if you leave both of them.

JavierCastro
  • 318
  • 2
  • 8