Throw your weight around

Linear layouts support a layout_weight attribute.

We can use the weight attribute to allocate a portion of the layout’s space to a view, depending on its weight.

All views have a default weight of 0.

You can set a weight attribute using a float value for any view that you use in a LinearLayout. Android will then divide the available space up amongst the views proportionately, depending on their weight values.