A common use for LinearLayout is to evenly space (weight) views, for example:
How do you implement evenly spaced views like this using the new ConstraintLayou
To create 2 views in same line, equal width, just need to define
Note
MATCH_CONSTRAINT
)button1
and button2
must like aboveResult
MORE
If you want View1
bigger than View2
you can use weight
or percent
.
Example, View1
width = 2 *View2
width use weight
Result
Example, View1
width = 2 *View2
width use percent
Result