【发布时间】:2017-05-30 22:49:20
【问题描述】:
我在 ConstrainLayout 中有如下视图。
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxWidth="260dp"
android:textColor="#FFF"
android:textSize="16sp"
app:layout_constraintLeft_toLeftOf="@+id/parent"
app:layout_constraintTop_toBottomOf="@id/message_date"
android:id="@+id/text_main"
/>
我想根据某些条件在 recycleViewHolder 中以编程方式将视图更改为 app:layout_constraintLeft_toLeftOf="@+id/parent" 或 layout_constraintLeft_toRightOf="@+id/parent"。
【问题讨论】:
-
@W4R10CK 我不想添加视图,我只想更改对齐方式。您可以发布该答案的相关部分吗?
标签: android android-support-library android-constraintlayout