- layout_goneMarginEnd
- layout_goneMarginLeft
- layout_goneMarginTop
- layout_goneMarginRight
- layout_goneMarginBottom
水平居中
app:layout_constraintLeft_toRightOf=“parent”
app:layout_constraintRight_toLeftOf="parent
垂直居中
app:layout_constraintTop_toBottompOf=“parent”
app:layout_constraintBottom_toTopOf=“parent”
例子:水平垂直居中:
<?xml version="1.0" encoding="utf-8"?><android.support.constraint.ConstraintLayout xmlns:android=“http://schemas.android.com/apk/res/android”
xmlns:app=“http://schemas.android.com/apk/res-auto”
android:layout_width=“match_parent”
android:layout_height=“match_parent”>
<Button
android:id="@+id/btnA"
android:layout_width=“wrap_content”
android:layout_height=“wrap_conten