- wrap_content:是layout_width和layout_height的属性值之一,表示和自身内容一样的长度。
<TextView
android:textSize="18dp"
android:layout_marginRight="50dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="User 值:" />
- match_parent:是layout_width和layout_height的属性值之一,表示和父组件一样的长度。
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="20dp">
...
</LinearLayout>