<?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"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/downloads_card_constraintLayout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    >

    <com.google.android.material.card.MaterialCardView
        android:id="@+id/download_card_view"
        android:layout_width="0dp"
        android:layout_height="100dp"
        android:layout_margin="10dp"
        android:checkable="true"
        app:cardCornerRadius="10dp"
        app:cardMaxElevation="12dp"
        app:cardPreventCornerOverlap="true"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:strokeWidth="0dp">

        <androidx.appcompat.widget.AppCompatImageView
            android:id="@+id/downloads_image_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:adjustViewBounds="true"
            android:scaleType="centerCrop" />

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

            <LinearLayout
                android:id="@+id/title_author"
                android:layout_width="0dp"
                android:paddingStart="10dp"
                android:paddingEnd="10dp"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                app:layout_constraintEnd_toStartOf="@+id/action_button"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent">

                <TextView
                    android:id="@+id/title"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:ellipsize="end"
                    android:maxLines="2"
                    android:paddingTop="10dp"
                    android:paddingEnd="10dp"
                    android:shadowColor="@color/black"
                    android:shadowDx="4"
                    android:shadowDy="4"
                    android:shadowRadius="2"
                    android:textColor="@color/white"
                    android:textSize="15sp"
                    android:textStyle="bold" />

                <TextView
                    android:id="@+id/subtitle"
                    android:layout_width="296dp"
                    android:layout_height="20dp"
                    android:ellipsize="end"
                    android:gravity="bottom"
                    android:maxLines="1"
                    android:paddingEnd="10dp"
                    android:paddingBottom="5dp"
                    android:shadowColor="@color/black"
                    android:shadowDx="4"
                    android:shadowDy="4"
                    android:shadowRadius="1.5"
                    android:textColor="@color/white"
                    android:textSize="11sp"
                    android:textStyle="bold" />


            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:paddingStart="10dp"
                android:paddingEnd="10dp"
                android:gravity="bottom"
                android:paddingBottom="5dp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/title_author">

                <TextView
                    android:id="@+id/format_note"
                    style="@style/Widget.Material3.FloatingActionButton.Large.Primary"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginEnd="5dp"
                    android:background="?attr/colorPrimary"
                    android:clickable="false"
                    android:gravity="center"
                    android:minWidth="30dp"
                    android:paddingHorizontal="10dp"
                    app:cornerRadius="10dp"
                    android:maxLines="1"
                    android:ellipsize="end"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <TextView
                    android:id="@+id/codec"
                    style="@style/Widget.Material3.FloatingActionButton.Large.Secondary"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginEnd="5dp"
                    android:background="?attr/colorSecondary"
                    android:clickable="false"
                    android:gravity="center"
                    android:minWidth="30dp"
                    android:paddingHorizontal="10dp"
                    app:cornerRadius="10dp"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <TextView
                    android:id="@+id/file_size"
                    style="@style/Widget.Material3.FloatingActionButton.Large.Tertiary"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginEnd="5dp"
                    android:background="?attr/colorTertiary"
                    android:clickable="false"
                    android:gravity="center"
                    android:minWidth="30dp"
                    android:paddingHorizontal="10dp"
                    app:cornerRadius="10dp"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />


            </LinearLayout>


            <com.google.android.material.button.MaterialButton
                android:id="@+id/action_button"
                style="@style/Widget.Material3.ExtendedFloatingActionButton.Icon.Secondary"
                android:layout_width="55dp"
                android:layout_height="55dp"
                android:layout_margin="10dp"
                android:layout_marginEnd="8dp"
                app:cornerRadius="10dp"
                app:icon="@drawable/ic_video"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintVertical_bias="0.155" />


        </androidx.constraintlayout.widget.ConstraintLayout>

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

</androidx.constraintlayout.widget.ConstraintLayout>