目录
1.打开android studio软件
2.新建empty activity
3.看个人配置填(finish)
4.左侧找到res->layout(页面布局)
5.先设置页面布局,这里采用线性布局
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#e5e4e2">
</LinearLayout>
android:layout_width=""的使用方法
android:layout_width
是控件在水平方向上的布局参数,其属性值包括match_parent
、wrap_content