<?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:orientation="vertical" > --> 组件的排列方式,此为垂直排列
<TextView -->此为文本显示组件,显示提示信息。
android:layout_width="fill_parent" -->此组件宽度为频幕宽度,现为当前手机宽度
android:layout_height="wrap_content" -->此组件高度为文字幕宽度
android:text="@string/hello" /> -->组件默认显示文字,此时为string.xml
</LinearLayout>
main.xml解析
最新推荐文章于 2021-05-28 23:46:28 发布