<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/main_container"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="3dp"
    android:layout_marginBottom="3dp"
    android:animateLayoutChanges="true">

    <RadioButton
        android:id="@+id/checkbox_instance"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_margin="4dp"
        android:ellipsize="end"
        android:singleLine="true"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="@id/barrier_info_start"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <androidx.constraintlayout.widget.Barrier
        android:id="@+id/barrier_info_start"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:barrierDirection="start"
        app:constraint_referenced_ids="use_cloudflare,progress" />

    <ImageView
        android:id="@+id/use_cloudflare"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:layout_marginEnd="2dp"
        android:layout_marginRight="2dp"
        android:contentDescription="@string/cloudflare"
        android:src="@drawable/ic_warning"
        app:layout_constraintBottom_toTopOf="@id/barrier_latency_top"
        app:layout_constraintEnd_toStartOf="@id/locale"
        app:layout_constraintHeight_percent="0.5"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/locale"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:layout_marginEnd="2dp"
        android:layout_marginRight="2dp"
        android:gravity="center_vertical"
        android:textAllCaps="true"
        app:layout_constraintBottom_toTopOf="@id/barrier_latency_top"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHeight_percent="0.5"
        app:layout_constraintTop_toTopOf="parent" />

    <androidx.constraintlayout.widget.Barrier
        android:id="@+id/barrier_latency_top"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:barrierAllowsGoneWidgets="false"
        app:barrierDirection="top"
        app:constraint_referenced_ids="progress,latency" />

    <ProgressBar
        android:id="@+id/progress"
        android:layout_width="20dp"
        android:layout_height="20dp"
        android:layout_marginEnd="2dp"
        android:layout_marginRight="2dp"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintDimensionRatio="1:1"
        app:layout_constraintEnd_toStartOf="@id/latency"
        app:layout_constraintHeight_percent="0.5"
        app:layout_constraintTop_toBottomOf="@id/locale" />

    <TextView
        android:id="@+id/latency"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:layout_marginEnd="2dp"
        android:layout_marginRight="2dp"
        android:gravity="center_vertical"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHeight_percent="0.5"
        app:layout_constraintTop_toBottomOf="@id/locale" />

</androidx.constraintlayout.widget.ConstraintLayout>