看代码,定义一个容器名字为 ll_root,在里面创建 5 个子 View;
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ll_root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="50dp"
android:gravity="center"/>
<TextView
android:layout_width="match_parent"
android:layout_height="50dp"
android:gravity="center"/>
<TextView
android:layout_width="match_parent"
android:layout_height="50dp"
android:gravity="center"/>
<TextView
android:layout_width="match_parent"
a