Android——RelativeLayout

代码:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<View
android:id="@+id/View_1"
android:layout_width="200dp"
android:layout_height="200dp"
android:background="#09C7F7">

<View
android:id="@+id/View_2"
android:layout_width="200dp"
android:layout_height="200dp"
android:background="#FFCC00"
android:layout_toRightOf="@+id/View_1"
>
<LinearLayout
android:id="@+id/ll_1"
android:layout_width="match_parent"
android:layout_height="200dp"
android:orientation="horizontal"
android:layout_below="@+id/View_1"
android:background="#38F709"
android:padding="20dp">

<View
android:id="@+id/View_3"
android:layout_width="200dp"
android:layout_height="200dp"
android:background="#FFCC00">
<RelativeLayout
android:layout_width="200dp"
android:layout_height="200dp"
android:background="#EE113D">
</RelativeLayout>

</LinearLayout>


</RelativeLayout>
运行截图:
 
原文地址:https://www.cnblogs.com/zyj3955/p/14304392.html