<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView 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="120dp"
    android:layout_height="wrap_content"
    android:layout_marginEnd="12dp"
    android:clickable="true"
    android:focusable="true"
    app:cardCornerRadius="8dp"
    app:cardElevation="2dp">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:padding="8dp">

        <androidx.cardview.widget.CardView
            android:layout_width="match_parent"
            android:layout_height="100dp"
            app:cardCornerRadius="4dp">

            <ImageView
                android:id="@+id/categoryImage"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:scaleType="centerCrop"
                tools:src="@tools:sample/backgrounds/scenic" />

        </androidx.cardview.widget.CardView>

        <TextView
            android:id="@+id/categoryName"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:ellipsize="end"
            android:gravity="center"
            android:maxLines="1"
            android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle2"
            tools:text="Rock" />

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