<androidx.constraintlayout.widget.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="35dp"
    android:clickable="true">

    <ImageView
        android:id="@+id/image_device"
        android:layout_width="25dp"
        android:layout_height="25dp"
        android:contentDescription="@string/cd_image_device"
        app:srcCompat="@drawable/ic_chromecast"
        android:scaleType="fitCenter"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"/>

    <TextView
        android:id="@+id/text_name"
        android:layout_width="0dp"
        android:layout_weight="1"
        android:layout_height="wrap_content"
        tools:text="SHIELD TV"
        android:maxLines="1"
        android:ellipsize="end"
        android:textSize="12dp"
        android:fontFamily="@font/inter_light"
        android:textColor="@color/white"
        android:layout_marginStart="10dp"
        android:layout_marginEnd="10dp"
        android:includeFontPadding="false"
        app:layout_constraintTop_toTopOf="@id/image_device"
        app:layout_constraintLeft_toRightOf="@id/image_device"
        app:layout_constraintRight_toLeftOf="@id/layout_button" />

    <TextView
        android:id="@+id/text_type"
        android:layout_width="0dp"
        android:layout_weight="1"
        android:layout_height="wrap_content"
        tools:text="Chromecast"
        android:textSize="10dp"
        android:fontFamily="@font/inter_extra_light"
        android:textColor="@color/white"
        android:includeFontPadding="false"
        android:layout_marginStart="10dp"
        android:layout_marginEnd="10dp"
        app:layout_constraintTop_toBottomOf="@id/text_name"
        app:layout_constraintLeft_toRightOf="@id/image_device"
        app:layout_constraintRight_toLeftOf="@id/layout_button" />

    <LinearLayout
        android:id="@+id/layout_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        android:gravity="center">

        <ImageView
            android:id="@+id/image_loader"
            android:layout_width="25dp"
            android:layout_height="25dp"
            android:contentDescription="@string/cd_image_loader"
            app:srcCompat="@drawable/ic_loader_animated"
            android:layout_marginEnd="8dp"/>

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:orientation="horizontal"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent">

            <LinearLayout
                android:id="@+id/button_remove"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/background_button_accent"
                android:paddingStart="8dp"
                android:paddingEnd="8dp"
                android:paddingTop="4dp"
                android:paddingBottom="4dp"
                android:layout_marginEnd="7dp"
                android:visibility="gone">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textSize="12dp"
                    android:textColor="@color/white"
                    android:fontFamily="@font/inter_light"
                    android:text="@string/remove" />
            </LinearLayout>

            <LinearLayout
                android:id="@+id/button_disconnect"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/background_button_accent"
                android:paddingStart="8dp"
                android:paddingEnd="8dp"
                android:paddingTop="4dp"
                android:paddingBottom="4dp">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textSize="12dp"
                    android:textColor="@color/white"
                    android:fontFamily="@font/inter_light"
                    android:text="@string/stop" />
            </LinearLayout>

            <LinearLayout
                android:id="@+id/button_connect"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/background_button_primary"
                android:paddingStart="8dp"
                android:paddingEnd="8dp"
                android:paddingTop="4dp"
                android:paddingBottom="4dp"
                android:visibility="gone">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textSize="12dp"
                    android:textColor="@color/white"
                    android:fontFamily="@font/inter_light"
                    android:text="@string/start" />
            </LinearLayout>
        </LinearLayout>

        <TextView
            android:id="@+id/text_not_ready"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="12dp"
            android:textColor="@color/white"
            android:fontFamily="@font/inter_light"
            android:text="@string/not_ready"
            android:visibility="gone"/>
    </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>