Buttons at the bottom of the screen-Android

Good afternoon. How to make Android buttons pressed to the bottom of the screen as it is done in the picture?

example

Author: pavlofff, 2016-05-03

1 answers

For example, in this way:

<RelativeLayout ...>
    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true">

        <Button
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="0" />

        <Button
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:text="1"
            android:layout_weight="1" />
    </LinearLayout>
</RelativeLayout>

LinearLayout place 2 buttons at the bottom, give them the same layout_weight and style them as you need.

 2
Author: VAndrJ, 2016-05-04 09:19:05