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