<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView android:id="@+id/playlist_card"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:checkable="true"
    android:clickable="true"
    android:focusable="true"
    app:strokeWidth="0dp"
    android:backgroundTint="@android:color/transparent"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">


    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingHorizontal="20dp"
        android:paddingVertical="10dp">

        <com.google.android.material.imageview.ShapeableImageView
            android:id="@+id/downloads_image_view"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:adjustViewBounds="true"
            android:background="?attr/colorSurfaceVariant"
            android:scaleType="centerCrop"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintDimensionRatio="H,16:9"
            app:layout_constraintEnd_toStartOf="@+id/download_item_data"
            app:layout_constraintHorizontal_weight="0.3"
            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="wrap_content"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@+id/checkBox"
            app:layout_constraintHorizontal_weight="0.7"
            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: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:textSize="13sp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/title" />

        </androidx.constraintlayout.widget.ConstraintLayout>

        <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>



</com.google.android.material.card.MaterialCardView>
