资料
ConstraintLayout布局 居中|居右 实现。
ConstraintLayout中TextView文字超过屏幕问题
具体的方法
layout_constraintLeft_toLeftOf
layout_constraintLeft_toRightOf
layout_constraintRight_toLeftOf
layout_constraintRight_toRightOf
layout_constraintTop_toTopOf
layout_constraintTop_toBottomOf
layout_constraintBottom_toTopOf
layout_constraintBottom_toBottomOf
layout_constraintBaseline_toBaselineOf
layout_constraintStart_toEndOf
layout_constraintStart_toStartOf
layout_constraintEnd_toStartOf
layout_constraintEnd_toEndOf
位于父布局的左边右边
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintTop_toBottomOf="parent"
TextView超出的范围
<TextView
android:id="@+id/lll"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/oppo_size_132"
android:ellipsize="end"
android:gravity="center_vertical"
android:lines="1"
android:text="abcdefghijklmnopqrstuvwxyz1234567890"
android:textColor="@color/color_333333"
android:textSize="@dimen/oppo_size_68"
app:layout_constraintEnd_toStartOf="@+id/ddd"
app:layout_constraintRight_toRightOf="@+id/ddd"
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/ddd"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:ellipsize="end"
android:gravity="center_vertical"
android:lines="1"
android:text="全部专题"
android:textColor="@color/color_333333"
android:textSize="@dimen/oppo_size_68"
app:layout_constraintRight_toRightOf="parent" />