<?xml version=
"1.0"
encoding=
"utf-8"
?>
<LinearLayout xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"fill_parent"
android:layout_height=
"fill_parent"
android:paddingLeft=
"16dp"
android:paddingRight=
"16dp"
android:orientation=
"vertical"
>
<EditText
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:hint=
"@string/to"
/>
<EditText
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:hint=
"@string/subject"
/>
<EditText
android:layout_width=
"fill_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1"
android:gravity=
"top"
android:hint=
"@string/message"
/>
<Button
android:layout_width=
"100dp"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right"
android:text=
"@string/send"
/>
</LinearLayout>
<!-- android:orientation=
"vertical"
代表方向垂直-->
<!-- android:layout_weight=
"1"
代表所占权重(比例) message占满其他元素剩余的地方,
如果有多个android:layout_weight=
1
,则平分剩余空间
android:gravity=
"top"
表示从上面开始占(写了android:layout_weight的)
android:layout_gravity=
"right"
整个组件的位置居右
-->