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

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. Spring4 mvc+maven 框架搭建(2)

    在上一篇博客中,数据库数据和mybatis相关的java代码已经生成,接下来就可以使用IDE工具来搭建框架了. 在这里,我使用maven构建和管理代码,使用jdk1.8环境. 首先打开Eclipse, ...

  2. SQL SERVICE 拆分字符串的表值函数

    SQL代码 ALTER FUNCTION [dbo].[SplitToTable]( @SplitString nvarchar(max), @Separator nvarchar(10)=' ')R ...

  3. CentOS下使用crontab命令来定时执行任务

    原文地址:http://www.centoscn.com/CentOS/help/2015/0424/5261.html crontab命令 是用来让使用者在固定时间或固定间隔执行程序之用,换句话说, ...

  4. Android在代码中获取应用签名

    平时都是用AS敲命令获取签名信息...还没有在代码中获取过签名~ 也算是老编程了,没做过这个稍微有点尴尬...本着有好轮子就用的原则,网上找了几篇博客,这块内容已经很完善了,我也没什么可以优化的... ...

  5. org.jeecgframework.core.common.exception.MyExceptionHandler]java.lang.NullPointerException

    问题原因:

  6. nginx配置文件nginx.conf 不包括server节点

    整理的一个nginx.conf的配置,不包括server节点介绍 原文请查看,Nginx配置文件(nginx.conf)配置详解 # For more information on configura ...

  7. Nginx缓存配置之手动清除缓存

    访问我的博客 前言 前文介绍了利用 nginx 的 nginx_ngx_cache_purge 模块来实现缓存功能,并设置了缓存时间为一天. 但是如果前端修改了页面,比如首页,由于 Nginx 缓存的 ...

  8. 实现比较器接口IComparable<T>,让自定义类型数组也能排序

    using System; namespace LinqDemo1 { class Program { static void Main(string[] args) { Person[] perso ...

  9. 网络之Json生成解析

    // // ViewController.m // Json // // Created by City--Online on 15/4/28. // Copyright (c) 2015年 CYW. ...

  10. [转]web打印实现方案 Lodop6.034 使用方法总结

    本文转自:https://www.cnblogs.com/tiger8000/archive/2011/09/19/2181365.html 官文下载: http://mtsoftware.v053. ...