代码演示:
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android=“http://schemas.android.com/apk/res/android”
xmlns:app=“http://schemas.android.com/apk/res-auto”
xmlns:tools=“http://schemas.android.com/tools”
android:layout_width=“match_parent”
android:layout_height=“match_parent”
android:orientation=“vertical”
tools:context=".MainActivity">
<RelativeLayout
android:background="#FFFF00"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.8">
<LinearLayout
android:layout_marginLeft="100dp"
android:layout_marginRight="100dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="150dp">