<?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/playlist_card_constraintLayout"
    android:layout_width="match_parent"
    android:layout_marginBottom="10dp"
    android:checkable="true"
    android:clickable="true"
    android:focusable="true"
    android:background="?android:attr/selectableItemBackground"
    android:layout_height="wrap_content">

    <FrameLayout
        android:id="@+id/download_card_view"
        android:layout_width="0dp"
        android:paddingHorizontal="10dp"
        android:paddingVertical="3dp"
        app:shapeAppearance="@style/ShapeAppearanceOverlay.Avatar"
        android:layout_height="wrap_content"
        app:cardPreventCornerOverlap="true"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@+id/checkBox"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:strokeWidth="0dp">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <com.google.android.material.imageview.ShapeableImageView
                android:id="@+id/downloads_image_view"
                android:clickable="false"
                android:layout_width="0dp"
                android:layout_height="0dp"
                app:layout_constraintHorizontal_weight="0.4"
                android:adjustViewBounds="true"
                android:scaleType="centerCrop"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintDimensionRatio="H,16:9"
                app:layout_constraintEnd_toStartOf="@+id/download_item_data"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:shapeAppearance="@style/ShapeAppearanceOverlay.Avatar"
                />

            <TextView
                android:id="@+id/duration"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="#80000000"
                android:clickable="false"
                android:layout_margin="5dp"
                android:ellipsize="end"
                android:gravity="center"
                android:textStyle="bold"
                android:maxLength="17"
                android:maxLines="1"
                android:minWidth="30dp"
                android:paddingHorizontal="5dp"
                android:textColor="@color/white"
                android:textSize="12sp"
                app:cornerRadius="10dp"
                app:layout_constraintBottom_toBottomOf="@+id/downloads_image_view"
                app:layout_constraintEnd_toEndOf="@+id/downloads_image_view" />

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/download_item_data"
                android:layout_width="0dp"
                android:layout_height="0dp"
                app:layout_constraintHorizontal_weight="0.7"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="@+id/downloads_image_view"
                app:layout_constraintTop_toTopOf="parent">

                <TextView
                    android:id="@+id/title"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:ellipsize="end"
                    android:maxLines="2"
                    android:paddingHorizontal="10dp"
                    android:scrollbars="none"
                    android:shadowDx="4"
                    android:shadowDy="4"
                    android:shadowRadius="2"
                    android:textSize="15sp"
                    android:textStyle="bold"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    />

                <TextView
                    android:id="@+id/author"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:ellipsize="end"
                    android:paddingHorizontal="10dp"
                    android:scrollbars="none"
                    android:shadowDx="4"
                    android:shadowDy="4"
                    android:shadowRadius="2"
                    android:textSize="13sp"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@id/title"
                    />

            </androidx.constraintlayout.widget.ConstraintLayout>


        </androidx.constraintlayout.widget.ConstraintLayout>

    </FrameLayout>


    <CheckBox
        android:id="@+id/checkBox"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>
