ConstraintLayout (约束布局)属性详情
本文部分内容来自于网络,点击浏览原文
app:layout_constraintLeft_toLeftOf
//Constrains the left side of a child to the left side of a target child (contains the target child id).
表示此控件的左边框与某个控件的左边框对齐或者在其右边
app:layout_constraintLeft_toRightOf
//Constrains the left side of a child to the right side of a target child (contains the target child id).
表示此控件的左边框与某个控件的右边框对齐或者在其右边
app:layout_constraintRight_toLeftOf
//Constrains the right side of a child to the left side of a target child (contains the target child id).
表示此控件的右边框与某个控件的左边框对齐或在其左边
app:layout_constraintRight_toRightOf
//Constrains the right side of a child to the right side of a target child (contains the target child id).
表示此控件的右边框与某个控件的右边框对齐或在其左边
app:layout_constraintTop_toTopOf
//Constrains the top side of a child to the top side of a target child (contains the target child id).
表示此控件的顶部边框与某个控件的顶部边框水平对齐或在其下边
app:layout_constraintTop_toBottomOf
//Constrains the top side of a child to the bottom side of a target child (contains the target child id).
表示此控件的顶部边框与某个控件的底部边框水平对齐或在其下边
app:layout_constraintBottom_toTopOf
//Constrains the bottom side of a child to the top side of a target child (contains the target child id).
表示此控件的底部边框与某个控件的顶部边框水平对齐或其上边
app:layout_constraintBottom_toBottomOf
//Constrains the bottom side of a child to the bottom side of a target child (contains the target child id).
表示此控件的底部边框与某个控件的底部边框水平对齐或其上边
app:layout_constraintBaseline_toBaselineOf
//Constrains the baseline of a child to the baseline of a target child (contains the target child id).
表示此控件与某个控件水平对齐
app:layout_editor_absoluteX
//The design time location of the left side of the child.
表示此控件在布局中X轴的绝对坐标点。如图代码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)
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%的位置)
app:layout_constraintStart_toEndOf
//Constrains the start side of a child to the end side of a target child (contains the target child id).
表示此控件的左边界在某个控件右边界的右边,及表示此控件在某个控件的右边
app:layout_constraintStart_toStartOf
//Constrains the start side of a child to the start side of a target child (contains the target child id).
表示此控件的左边界与某个控件的左边界在同一垂直线上
app:layout_constraintEnd_toStartOf
//Constrains the end side of a child to the start side of a target child (contains the target child id).
表示此控件的右边界与某个控件的左边界在同一垂直线上
app:layout_constraintEnd_toEndOf
//Constrains the end side of a child to the end side of a target child (contains the target child id).
表示此控件的右边界与某个控件的右边界对齐
app:layout_constraintHorizontal_bias
//The ratio between two connections when the left and right (or start and end) sides are constrained.
表示此控件在布局中的水平方向上的偏移百分百。如视图16,代码16
app:layout_constraintVertical_bias
//The ratio between two connections when the top and bottom sides are constrained.
表示此控件在布局中的的垂直方向上的偏移百分百。如视图16,代码16
app:layout_constraintDimensionRatio
//The child's side to constrain using dimensRatio.
表示两个控件的纵横比,而使用则需要把宽(layout_width)或者高(layout_height)设置为0dp,根据另一个属性和比例, 计算当前属性, 如两个图片控件的显示大小,app:layout_constraintDimensionRatio="4:3";

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 (约束布局)属性详情的更多相关文章
- Android ConstraintLayout 约束布局属性
常用方法总结 layout_constraintTop_toTopOf // 将所需视图的顶部与另一个视图的顶部对齐. layout_constraintTop_toBottomOf // 将所需视图 ...
- 使用ConstraintLayout(约束布局)构建响应式UI
使用ConstraintLayout(约束布局)构建响应式UI 转 https://www.300168.com/yidong/show-2740.html 核心提示:ConstraintLa ...
- Android Material Design控件使用(一)——ConstraintLayout 约束布局
参考文章: 约束布局ConstraintLayout看这一篇就够了 ConstraintLayout - 属性篇 介绍 Android ConstraintLayout是谷歌推出替代PrecentLa ...
- ConstraintLayout 约束布局
约束布局ConstraintLayout 这种布局方式出现已经有一段时间了,刚出现的时候一直以为这种布局只是针对拖拽使用的布局,最近在新项目里看到了这种布局,又重新学习了这种布局,才发现以前真的是图样 ...
- Android 开发 CoordinatorLayout 协调者布局 与 ConstraintLayout约束布局 两者的关系
在摸索新技术是发现CoordinatorLayout 与 ConstraintLayout 会有冲突关系,所以就研究了一下他们之间的不兼容,被影响的方面.其实某种程度上来说是CoordinatorLa ...
- 约束布局ConstraintLayout详解
约束布局ConstraintLayout详解 转 https://www.jianshu.com/p/17ec9bd6ca8a 目录 1.介绍 2.为什么要用ConstraintLayout 3.如何 ...
- Android开发之ConstraintLayout相对布局
介绍 一个 ConstraintLayout 是一个 ViewGroup 允许您以灵活的方式定位和调整小部件的方法. 注意: ConstraintLayout 作为支持库提供,您可以在API级别9(G ...
- 约束布局ConstraintLayout加快布局速度
Android Studio2.2更新布局设计器,同时,引人了约束布局ConstraintLayout. 简单来说,可以把它看做是相对布局的升级版本,但是区别与相对布局更加强调约束.何为约束,即控件之 ...
- 约束布局constraint-layout导入失败的解决方案 - 转
今天有同事用到了约束布局,但是导入我的工程出现错误 **提示错误: Could not find com.Android.support.constraint:constraint-layout:1. ...
- 约束布局ConstraintLayout
Android新特性介绍,ConstraintLayout完全解析 约束布局ConstraintLayout用法全解析 约束布局ConstraintLayout看这一篇就够了
随机推荐
- python 继承 多态
python 的继承 #-*- coding:utf-8 -*-class A(object): def __init__(self): print('A:我是肯定会执行的!!') def fun(s ...
- 解析Service之你需要了解的一些东东
何为Service Service,俗名服务.在Android系统中,Service与Activity就像一个妈生的,不仅长得像,而且行为(生命周期)也有一些类似.对于Activity来说大家肯定不会 ...
- 【Java初探外篇02】——关于静态方法与实例方法
在Java的学习中,我们知道,方法的使用是不可或缺的重要部分,在我们编写第一个Java程序hello world的时候,我们就要开始使用主方法main():它就是一个静态方法(static metho ...
- gulp学习笔记-怎样做一个gulp-demo
第一步:在文件夹内:鼠标右键+shift 选择提示窗口中的 在此处打开命令窗口 第二步:创建npm的配置文件,在命令窗口中输入 npm init 进行npm的配置 npm init gulp-d ...
- mysql索引总结(1)-mysql 索引类型以及创建
mysql索引总结(1)-mysql 索引类型以及创建 mysql索引总结(2)-MySQL聚簇索引和非聚簇索引 mysql索引总结(3)-MySQL聚簇索引和非聚簇索引 mysql索引总结(4)-M ...
- python 常用算法学习(1)
算法就是为了解决某一个问题而采取的具体有效的操作步骤 算法的复杂度,表示代码的运行效率,用一个大写的O加括号来表示,比如O(1),O(n) 认为算法的复杂度是渐进的,即对于一个大小为n的输入,如果他的 ...
- UVa 514 Rails(栈的应用)
题目链接: https://cn.vjudge.net/problem/UVA-514 /* 问题 输入猜测出栈顺序,如果可能输出Yes,否则输出No 解题思路 貌似没有直接可以判定的方法,紫书上给出 ...
- 我进行jvm内存调优的一些记录
jvm内存调优的一些记录 java内存调优的方法和过程 可以使用 jmap -heap pid号 查看,例如pid是9300,执行的结果可能是这样的. root@ubuntu:~# jmap -hea ...
- MVC应用程序实现上传文件(续)
前几天,有练习了<MVC应用程序实现上传文件>http://www.cnblogs.com/insus/p/3590907.html 那只是把文档上传至MVC应用程序下的某一目录之中. 其 ...
- javascript学习之路之元素获取和设置属性
收拾心情,学习学习js!总结下自己的学习所得! 现有的有三种方法可以获取元素的节点,分别是通过元素ID,通过标签名和类名来获取的 1.GetElmentById:将返回一个与那个有给定ID属性的值的元 ...