<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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_marginHorizontal="2dp"
    android:layout_height="wrap_content">

    <com.google.android.material.card.MaterialCardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="4dp"
        app:cardCornerRadius="8dp">

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

            <LinearLayout
                android:id="@+id/selectedLayer"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:alpha="0.3"
                android:background="?attr/colorControlNormal"
                android:orientation="horizontal"
                android:visibility="gone"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <LinearLayout
                android:id="@+id/linearLayout2"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:padding="8dp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintDimensionRatio="1:1"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent">

                <ImageView
                    android:id="@+id/folderIcon"
                    android:layout_width="48dp"
                    android:layout_height="48dp"
                    android:layout_gravity="center"
                    app:tint="?attr/colorPrimary"
                    android:src="@drawable/ic_folder" />

                <TextView
                    android:id="@+id/folderName"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="4dp"
                    android:ellipsize="end"
                    android:gravity="center"
                    android:singleLine="true"
                    android:textColor="?attr/colorPrimary"
                    android:maxLines="1"
                    android:textSize="14sp" />

            </LinearLayout>
        </androidx.constraintlayout.widget.ConstraintLayout>
    </com.google.android.material.card.MaterialCardView>
    <ImageView
        android:id="@+id/selected"
        android:layout_width="20dp"
        android:layout_height="20dp"
        android:background="@drawable/gradient_bg"
        android:padding="3dp"
        android:src="@drawable/selected"
        android:layout_gravity="end"
        android:visibility="visible"
        app:tint="#fff" />
</FrameLayout>