What is the difference between android: layout_alignRight = "ID" and android: layout_toRightOf = "ID"?

I think the title is pretty self explanatory. what is the difference between android: layout_alignRight = "@ id / someId" and android: layout_toRightOf = "@ id / someId"

+3


source to share


2 answers


This picture explains the difference:



enter image description here

+15


source


layout_alignRight

aligns the right edges of the two views.

layout_toRightOf

aligns the left edge of this view with the right edge of the other view someId

.



Documentation: http://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html

+2


source







All Articles