Barrier 是用多个 View 作为限制源来决定自身位置的一种辅助线.
<android.support.constraint.Barrier
android:id="@+id/barrier1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="right"
app:constraint_referenced_ids="button2,button1" />
其中 constraint_referenced_ids 指定限定源id,多个id用逗号隔开
barrierDirection 指定限制的方向 , 有 left, right, top, bottom, start, end, 6种
上面代表的是 barrier1 以 button2 和 button1 两者最右侧为基准线来作为自己的定位