<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="20dp" android:orientation="vertical" > <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#ff0000" android:layout_weight="1" /> <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#000000" android:layout_weight="1" android:layout_marginTop="20dp" /> <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#00ff00" android:layout_weight="1" android:layout_marginTop="20dp" /> <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#f0f000" android:layout_weight="1" android:layout_marginTop="20dp" /> <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#ff0011" android:layout_weight="1" android:layout_marginTop="20dp" /> </LinearLayout>
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:text="To" /> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Subject" /> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Message" android:layout_weight="1" /> <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Send" android:layout_gravity="bottom" android:gravity="right" /> </LinearLayout>