我可以想到一种不用链的替代解决方案。您可以使用Guideline
获得您要设计的布局。我为您创建了一个。让我知道是否有帮助。
<?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">
<android.support.constraint.Guideline
android:id="@+id/guideline_right_margin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent=".9" />
<android.support.constraint.Guideline
android:id="@+id/guideline_left_margin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent=".1" />
<android.support.constraint.Guideline
android:id="@+id/guideline_top_margin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent=".1" />
<TextView
android:id="@+id/text_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Text 1"
android:textSize="20sp"
app:layout_constraintStart_toStartOf="@+id/guideline_left_margin"
app:layout_constraintTop_toBottomOf="@+id/guideline_top_margin" />
<TextView
android:id="@+id/text_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Text 2"
android:textSize="20sp"
app:layout_constraintEnd_toStartOf="@+id/text_3"
app:layout_constraintStart_toStartOf="@+id/text_1"
app:layout_constraintTop_toBottomOf="@+id/guideline_top_margin" />
<TextView
android:id="@+id/text_3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="16dp"
android:text="Text 3"
android:textSize="20sp"
app:layout_constraintEnd_toStartOf="@+id/text_4"
app:layout_constraintTop_toBottomOf="@+id/guideline_top_margin" />
<TextView
android:id="@+id/text_4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Text 4"
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="@+id/guideline_right_margin"
app:layout_constraintTop_toBottomOf="@+id/guideline_top_margin" />
</android.support.constraint.ConstraintLayout>
这里是纵向模式下的外观。
这就是在横向模式下的外观。