相对布局练习_第1张图片

<?xml version="1.0" encoding="utf-8"?><RelativeLayout 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">    <View        android:id="@+id/view_1"        android:layout_width="100dp"        android:layout_height="100dp"        android:background="#000000"        />    <View        android:id="@+id/view_2"        android:layout_width="100dp"        android:layout_height="100dp"        android:background="#ccff66"        android:layout_alignParentBottom="true"        android:layout_alignParentRight="true"        />    <View        android:id="@+id/view_3"        android:layout_width="100dp"        android:layout_height="100dp"        android:background="#FF0033"        android:layout_toRightOf="@id/view_1"        />    <LinearLayout        android:id="@+id/ll_1"        android:layout_width="match_parent"        android:layout_height="200dp"        android:layout_below="@id/view_1"        android:orientation="horizontal"        android:background="#0066FF"        android:padding="15dp">        <View            android:layout_width="100dp"            android:layout_height="match_parent"            android:background="#FF0033"/>        <RelativeLayout            android:layout_width="match_parent"            android:layout_height="match_parent"            android:background="#000000"            android:padding="15dp">            <View                android:id="@+id/view_4"                android:layout_width="100dp"                android:layout_height="match_parent"                android:background="#FF9900"/>            <View                android:id="@+id/view_5"                android:layout_width="100dp"                android:layout_height="match_parent"                android:layout_marginLeft="10dp"                android:layout_toRightOf="@id/view_4"                android:background="#FF9900" />        RelativeLayout>    LinearLayout>RelativeLayout>

相对布局练习_第2张图片

更多相关文章

  1. android LinearLayout布局
  2. android 布局 GridLayout
  3. Android学习之自定义控件之图片带文字的View
  4. Android 系列 6.30将具有圆角的边框添加到布局
  5. Android与WebView本地上传图片问题
  6. Android 中,应用程序需要的图片资源如何针对不同屏幕大小手机设计
  7. 一款用于在 Android 设备上获取照片(拍照或从相册、文件中选择)、

随机推荐

  1. SQLyog
  2. 是什么束缚了SDN/NFV的应用?
  3. 智慧公安情报研判系统开发,重点人员可视化
  4. 你还在手撕微服务?快试试 go-zero 的微服
  5. 读深度学习《深度学习简介》
  6. SDN 2017发展回望
  7. John Chambers退休之后成立风投公司JC2 V
  8. macOS Big Sur 11.3,在安全方面的进步
  9. 【完整版53章,附源码+电子书】Go+Python双
  10. OpenDaylight系列文章(二):OpenDaylight初窥