How do I place my sections on the entire height of the screen, it turns out that each element occupies 1/3 the height of the screen

How do I place my sections on the full height of the screen? Now it turns out only so that each element occupies 1/3 the height of the screen.

    1 answer 1

    Look, for example, in the direction of the android:layout_weight .

    In the following example, each of the three RelativeLayout occupies a third of the screen.

     <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1"> </RelativeLayout> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1"> </RelativeLayout> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1"> </RelativeLayout> </LinearLayout> 

    And this, please put spaces after punctuation.

    • Thanks for the answer! - OPTIMIST .KZ