本文部分内容来自于网络,点击浏览原文

app:layout_constraintLeft_toLeftOf

//Constrains the left side of a child to the left side of a target child (contains the target child id).

表示此控件的左边框与某个控件的左边框对齐或者在其右边

视图1

代码1

app:layout_constraintLeft_toRightOf

//Constrains the left side of a child to the right side of a target child (contains the target child id).

表示此控件的左边框与某个控件的右边框对齐或者在其右边

视图2

app:layout_constraintRight_toLeftOf

//Constrains the right side of a child to the left side of a target child (contains the target child id).

表示此控件的右边框与某个控件的左边框对齐或在其左边

视图3

app:layout_constraintRight_toRightOf

//Constrains the right side of a child to the right side of a target child (contains the target child id).

表示此控件的右边框与某个控件的右边框对齐或在其左边

视图4

app:layout_constraintTop_toTopOf

//Constrains the top side of a child to the top side of a target child (contains the target child id).

表示此控件的顶部边框与某个控件的顶部边框水平对齐或在其下边

视图5

app:layout_constraintTop_toBottomOf

//Constrains the top side of a child to the bottom side of a target child (contains the target child id).

表示此控件的顶部边框与某个控件的底部边框水平对齐或在其下边

视图6

app:layout_constraintBottom_toTopOf

//Constrains the bottom side of a child to the top side of a target child (contains the target child id).

表示此控件的底部边框与某个控件的顶部边框水平对齐或其上边

视图7

app:layout_constraintBottom_toBottomOf

//Constrains the bottom side of a child to the bottom side of a target child (contains the target child id).

表示此控件的底部边框与某个控件的底部边框水平对齐或其上边

视图8

app:layout_constraintBaseline_toBaselineOf

//Constrains the baseline of a child to the baseline of a target child (contains the target child id).

表示此控件与某个控件水平对齐

视图9

代码2

app:layout_editor_absoluteX

//The design time location of the left side of the child.

表示此控件在布局中X轴的绝对坐标点。如图代码3

代码3

app:layout_editor_absoluteY

//The design time location of the right side of the child.

表示此控件在布局中Y轴的绝对坐标点。如图代码3

app:layout_constraintGuide_begin

//The distance of child (guideline) to the top or left edge of its parent.

表示在布局中引导线距顶部或左边框的距离(如:20dp表示距顶部或者左边框20dp)

视图10

代码10

app:layout_constraintGuide_end

//The distance of child (guideline) to the top or left edge of its parent.

表示在布局中引导线距底部的距离(如:10dp表示距顶部10dp)

app:layout_constraintGuide_percent

//The ratio of the distance to the parent's sides

表示在整个布局中引导线距离左边框的百分百(如:app:layout_constraintGuide_percent="0.5"表示距离左边框50%的位置)

视图11

代码11

app:layout_constraintStart_toEndOf

//Constrains the start side of a child to the end side of a target child (contains the target child id).

表示此控件的左边界在某个控件右边界的右边,及表示此控件在某个控件的右边

视图12

app:layout_constraintStart_toStartOf

//Constrains the start side of a child to the start side of a target child (contains the target child id).

表示此控件的左边界与某个控件的左边界在同一垂直线上

视图13

app:layout_constraintEnd_toStartOf

//Constrains the end side of a child to the start side of a target child (contains the target child id).

表示此控件的右边界与某个控件的左边界在同一垂直线上

视图14

app:layout_constraintEnd_toEndOf

//Constrains the end side of a child to the end side of a target child (contains the target child id).

表示此控件的右边界与某个控件的右边界对齐

视图15

app:layout_constraintHorizontal_bias

//The ratio between two connections when the left and right (or start and end) sides are constrained.

表示此控件在布局中的水平方向上的偏移百分百。如视图16,代码16

视图16

app:layout_constraintVertical_bias

//The ratio between two connections when the top and bottom sides are constrained.

表示此控件在布局中的的垂直方向上的偏移百分百。如视图16,代码16

代码16

app:layout_constraintDimensionRatio

//The child's side to constrain using dimensRatio.

表示两个控件的纵横比,而使用则需要把宽(layout_width)或者高(layout_height)设置为0dp,根据另一个属性和比例, 计算当前属性, 如两个图片控件的显示大小,app:layout_constraintDimensionRatio="4:3";

视图13

app:layout_goneMarginLeft

//The left margin to use when the target is gone.

app:layout_goneMarginTop

//The top margin to use when the target is gone.

app:layout_goneMarginRight

//The right margin to use when the target is gone

app:layout_goneMarginBottom

//The bottom margin to use when the target is gone.

app:layout_goneMarginStart

//The start margin to use when the target is gone.

app:layout_goneMarginEnd

//The end margin to use when the target is gone.

ConstraintLayout (约束布局)属性详情的更多相关文章

  1. Android ConstraintLayout 约束布局属性

    常用方法总结 layout_constraintTop_toTopOf // 将所需视图的顶部与另一个视图的顶部对齐. layout_constraintTop_toBottomOf // 将所需视图 ...

  2. 使用ConstraintLayout(约束布局)构建响应式UI

    使用ConstraintLayout(约束布局)构建响应式UI 转 https://www.300168.com/yidong/show-2740.html     核心提示:ConstraintLa ...

  3. Android Material Design控件使用(一)——ConstraintLayout 约束布局

    参考文章: 约束布局ConstraintLayout看这一篇就够了 ConstraintLayout - 属性篇 介绍 Android ConstraintLayout是谷歌推出替代PrecentLa ...

  4. ConstraintLayout 约束布局

    约束布局ConstraintLayout 这种布局方式出现已经有一段时间了,刚出现的时候一直以为这种布局只是针对拖拽使用的布局,最近在新项目里看到了这种布局,又重新学习了这种布局,才发现以前真的是图样 ...

  5. Android 开发 CoordinatorLayout 协调者布局 与 ConstraintLayout约束布局 两者的关系

    在摸索新技术是发现CoordinatorLayout 与 ConstraintLayout 会有冲突关系,所以就研究了一下他们之间的不兼容,被影响的方面.其实某种程度上来说是CoordinatorLa ...

  6. 约束布局ConstraintLayout详解

    约束布局ConstraintLayout详解 转 https://www.jianshu.com/p/17ec9bd6ca8a 目录 1.介绍 2.为什么要用ConstraintLayout 3.如何 ...

  7. Android开发之ConstraintLayout相对布局

    介绍 一个 ConstraintLayout 是一个 ViewGroup 允许您以灵活的方式定位和调整小部件的方法. 注意: ConstraintLayout 作为支持库提供,您可以在API级别9(G ...

  8. 约束布局ConstraintLayout加快布局速度

    Android Studio2.2更新布局设计器,同时,引人了约束布局ConstraintLayout. 简单来说,可以把它看做是相对布局的升级版本,但是区别与相对布局更加强调约束.何为约束,即控件之 ...

  9. 约束布局constraint-layout导入失败的解决方案 - 转

    今天有同事用到了约束布局,但是导入我的工程出现错误 **提示错误: Could not find com.Android.support.constraint:constraint-layout:1. ...

  10. 约束布局ConstraintLayout

    Android新特性介绍,ConstraintLayout完全解析 约束布局ConstraintLayout用法全解析 约束布局ConstraintLayout看这一篇就够了

随机推荐

  1. (转)Linux 系统监控、诊断工具之 top命令详解

    原文:https://www.linuxidc.com/Linux/2014-12/110563.htm 目录 (1)系统.任务统计信息:(2)进程. cpu 统计信息:(3)最后两行为内存信息:3. ...

  2. Android 安装时报错INSTALL_FAILED_NO_MATCHING_ABIS 的解决办法

    $ adb push D:\AndroidstudioTestWorkSpace\app\build\outputs\apk\app-debug.apk       /data/local/tmp/c ...

  3. 使用vue3.0和element实现后台管理模板

    通过自己所学的这段时间,利用空余时间,使用vue3.0脚手架搭建的一个关于后台的管理模板,所实现功能也是模仿一个后台的界面,数据分为两种存放,一种是直接存储到mlab,这里的数据是存放这登录注册,只有 ...

  4. 利用cygwin创建windows下的crontab定时任务

    要求 必备知识 熟悉基本编程环境搭建. 运行环境 windows 7(64位); Cygwin-1.7.35 下载地址 环境下载 什么是Cygwin Cygwin是一个在windows平台上运行的类U ...

  5. 牛X的规则引擎urule2

    牛X的规则引擎urule2 教程:http://wiki.bsdn.org/pages/viewpage.action?pageId=75071499

  6. Ceph/共享存储 汇总

    Ceph 存储集群 - 搭建存储集群 Ceph 存储集群 - 存储池 Ceph 块设备 - 命令,快照,镜像 Ceph 块设备 - 块设备快速入门 OpenStack 对接 Ceph CentOS7 ...

  7. 自我总结 (三) --(Java Web学习)

    自我完善的过程就是在不断的自我总结不断的改进. 在前的近半个月里,我们经过了考试,也开始了java web的项目. 先看看这次的考试.考完之后我就觉得有点不对劲的,结果 结果真的是一塌糊涂.上周五的时 ...

  8. json.stringify()的妙用,json.stringify()与json.parse()的区别

    一.JSON.stringify()与JSON.parse()的区别 最近做项目,发现JSON.stringify()使用场景真的挺多,我们都知道JSON.stringify()的作用是将 JavaS ...

  9. Java设计模式学习记录-代理模式

    代理模式 代理模式是常见设计模式的一种,代理模式的定义是:为其他对象提供一种代理以控制对这个对象的访问. 在某些情况下,一个对象不适合或者不能直接引用另一个对象,而代理对象可以在客户端和目标对象之间起 ...

  10. netty源码解解析(4.0)-4 线程模型-概览

    netty线程体系概览 netty的高并发能力很大程度上由它的线程模型决定的,netty定义了两种类型的线程: I/O线程: EventLoop, EventLoopGroup.一个EventLoop ...