layout_constraintWidth
用法: xml中
app:layout_constrainedWidth="true"
作用:使得该view的宽受限于他的约束
app:layout_constrainedHeight="true"同理
一个wrapcontent的view 的宽度随着内容变多最终是等于parent的宽度的 但实际上它的宽度不应改如此
eg1: 水平方向上 v1 leftToLeft = parent ,rightToLeft = v2
而v2 rightToRight = parent 当v1宽度达到最大时候布局就会变成这样
我们理想中的他的左边宽度不应该超出左边的
添加 app:layout_constrainedWidth=“true” 即可
相对圆心居中
把一个view (v1)作为圆心 对另外一个view (v2)进行布局
对v2进行设置
app:layout_constraintCircleRadius="40dp"
app:layout_constraintCircle="@id/testTv1"
app:layout_constrai