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

    <RelativeLayout
        android:id="@+id/active_download_relative_layout"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintDimensionRatio="H,2:1"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <com.google.android.material.card.MaterialCardView
            android:id="@+id/active_download_card_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:cardCornerRadius="10dp"
            app:cardElevation="10dp"
            app:cardMaxElevation="12dp"
            android:checkable="true"
            app:strokeWidth="0dp"
            app:cardPreventCornerOverlap="true"
            android:layout_margin="10dp">

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

                <com.google.android.material.progressindicator.LinearProgressIndicator
                    android:id="@+id/progress"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_gravity="bottom"
                    android:alpha="0.3"
                    android:scaleY="100"/>

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

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    android:orientation="vertical"
                    app:layout_constraintBottom_toTopOf="@+id/linearlayout2_horizontalscrollview"
                    app:layout_constraintEnd_toStartOf="@+id/active_download_cancel"
                    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:paddingStart="10dp"
                        android:scrollbars="none"
                        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="17sp"
                        android:textStyle="bold" />

                    <TextView
                        android:id="@+id/author"
                        android:layout_width="296dp"
                        android:layout_height="20dp"
                        android:ellipsize="end"
                        android:gravity="bottom"
                        android:maxLines="1"
                        android:layout_marginTop="5dp"
                        android:paddingStart="10dp"
                        android:scrollbars="none"
                        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="13sp"
                        android:textStyle="bold" />


                </LinearLayout>


                <HorizontalScrollView
                    android:id="@+id/linearlayout2_horizontalscrollview"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:scrollbars="none"
                    app:layout_constraintBottom_toTopOf="@+id/output"
                    app:layout_constraintStart_toStartOf="parent">

                    <com.google.android.material.chip.ChipGroup
                        android:id="@+id/linearLayout2"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:paddingHorizontal="10dp"
                        android:layout_gravity="bottom"
                        android:orientation="horizontal">

                        <com.google.android.material.chip.Chip
                            android:id="@+id/type"
                            style="@style/Widget.Material3.FloatingActionButton.Large.Secondary"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:clickable="false"
                            app:layout_constraintBottom_toTopOf="@+id/output"
                            app:layout_constraintStart_toStartOf="parent" />

                        <com.google.android.material.chip.Chip
                            android:id="@+id/format_note"
                            style="@style/Widget.Material3.FloatingActionButton.Large.Secondary"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:clickable="false"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />


                        <com.google.android.material.chip.Chip
                            android:id="@+id/codec"
                            style="@style/Widget.Material3.FloatingActionButton.Large.Secondary"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:clickable="false"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

                        <com.google.android.material.chip.Chip
                            android:id="@+id/file_size"
                            style="@style/Widget.Material3.FloatingActionButton.Large.Tertiary"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:clickable="false"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

                    </com.google.android.material.chip.ChipGroup>

                </HorizontalScrollView>


                <TextView
                    android:id="@+id/output"
                    android:layout_width="match_parent"
                    android:layout_height="50dp"
                    android:paddingLeft="10dp"
                    android:paddingTop="10dp"
                    android:paddingRight="10dp"
                    android:paddingBottom="10dp"
                    android:textSize="12sp"
                    android:fontFamily="monospace"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent" />

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/active_download_cancel"
                    style="@style/Widget.Material3.ExtendedFloatingActionButton.Icon.Secondary"
                    android:layout_width="55dp"
                    android:layout_height="55dp"
                    android:layout_margin="20dp"
                    app:cornerRadius="10dp"
                    app:icon="@drawable/ic_cancel"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

            </androidx.constraintlayout.widget.ConstraintLayout>

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

</androidx.constraintlayout.widget.ConstraintLayout>