线性布局LinearLayout
属性名 | 属性功能 | 属性值 |
---|---|---|
android:orientation | 排列方向 | vertical垂直方向排列、horizontal水平方向排列 |
android:layout_width | 宽度 | match_parent使匹配填充当前宽度与父宽度相同、fill_parent填满整个父宽度、wrap_content宽度与内容物所需宽度等价 |
示例代码:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
</LinearLayout>
相对布局RelativeLayout
在这种布局下可以让空间出现在布局任意位置
等我上完课在补全。。。