Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XML Android diferences between "end edge", "right edge", "toEndOf", "toRightOf"

At .xml Android Studio, what are the differences between:

1) "end edge" and "right edge" ?

2) "toEndOf" and "toRightOf" ?

3) "start edge" and "left edge" ?

4) "alignBaseline" and "alignBottom" ?

like image 744
Raul Figueira Avatar asked Oct 04 '16 13:10

Raul Figueira


1 Answers

Everything with a direction assigned to it is literal, as in left will always be left, right will always be right. Start and End are dependent on whether a language reads left-to-right or right-to-left, start and end matching those accordingly.

alignBaseline will align to the bottom of the text itself, where alignBottom will align to the bottom of the view. So in a view with text that has 10dp padding under it, alignBottom will align 10dp below the text, where alignBaseline will align with the bottom of the text itself.

This post has a good explanation of baseline. What is the baseline in RelativeLayout?

like image 63
ootinii Avatar answered Oct 12 '22 02:10

ootinii