уже использует вертикальную и горизонтальную цепочки в ограничении для видимости ручки. Но их недостаточно для того, чем я хочу заниматься. Мне нужно установить представление, подобное этому примеру:
1 2
3 4
5 6
И, например, когда я установил номер 2 для видимости GONE, номер 3 должен занять его место.
Я пытаюсь сделать что-то подобное, но я даже близко не могу ..
`<androidx.constraintlayout.widget.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:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/paymentCardQR"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@color/green"
app:layout_constraintBottom_toTopOf="@+id/paymentCardEfectivo"
app:layout_constraintEnd_toStartOf="@+id/paymentCardTarjeta"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed">
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/paymentCardEfectivo"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@color/red"
app:layout_constraintBottom_toTopOf="@+id/paymentCardCtaCliente"
app:layout_constraintEnd_toStartOf="@+id/paymentCardVoucher"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/paymentCardQR">
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/paymentCardCtaCliente"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@color/green"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/paymentCardOnline"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/paymentCardEfectivo">
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/paymentCardTarjeta"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@color/gray"
app:layout_constraintBottom_toTopOf="@+id/paymentCardVoucher"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/paymentCardQR"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed">
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/paymentCardVoucher"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@color/blue"
app:layout_constraintBottom_toTopOf="@+id/paymentCardOnline"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/paymentCardEfectivo"
app:layout_constraintTop_toBottomOf="@+id/paymentCardTarjeta">
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/paymentCardOnline"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/paymentCardCtaCliente"
app:layout_constraintTop_toBottomOf="@+id/paymentCardVoucher">
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>