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

example

  • 2
    put them gravity="bottom" - Vladyslav Matviienko
  • Android Studio is just one of the development environments. Your question does not apply to Android Studio itself, you can use any development environment for Android to get the same result. Attach the markup for your activity. - pavlofff

1 answer 1

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 below, in them 2 buttons, distribute to them the same layout_weight and layout_weight them as you need.