<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="110dp"
    android:layout_height="wrap_content"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools">

    <View
        android:id="@+id/theme_selected"
        android:layout_height="140dp"
        android:layout_width="0dp"
        android:layout_marginTop="6dp"
        android:layout_marginStart="6dp"
        android:layout_marginEnd="6dp"
        android:background="@drawable/theme_selected_border"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintBottom_toTopOf="@id/theme_name_text" />

    <com.google.android.material.card.MaterialCardView
        android:id="@+id/theme_card_view"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_margin="6dp"
        app:layout_constraintTop_toTopOf="@id/theme_selected"
        app:layout_constraintStart_toStartOf="@id/theme_selected"
        app:layout_constraintBottom_toBottomOf="@id/theme_selected"
        app:layout_constraintEnd_toEndOf="@id/theme_selected"
        app:cardElevation="4dp"
        app:cardCornerRadius="16dp">
        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:background="?android:attr/colorBackground"
            android:layout_height="match_parent">

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/theme_layout"
                android:layout_width="0dp"
                android:background="?android:attr/colorBackground"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                android:layout_height="0dp">

                <FrameLayout
                    android:id="@+id/theme_toolbar"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/theme_app_bar_preview"
                    android:background="?attr/colorSecondary"
                    android:elevation="1dp"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent">

                    <ImageView
                        android:id="@+id/theme_app_bar_text"
                        android:layout_width="match_parent"
                        android:layout_height="@dimen/theme_text_preview"
                        android:layout_gravity="start|center"
                        android:layout_marginStart="10dp"
                        android:layout_marginEnd="@dimen/theme_app_bar_margin_end"
                        android:src="@drawable/rounded_preview_rect"
                        app:tint="?actionBarTintColor"
                        tools:ignore="ContentDescription" />

                </FrameLayout>

                <ImageView
                    android:id="@+id/theme_hero_image"
                    android:src="@drawable/rounded_preview_rect"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/theme_hero_preview"
                    app:tint="?android:attr/textColorPrimary"
                    android:alpha="0.70"
                    android:layout_marginTop="@dimen/theme_padding_preview"
                    android:layout_marginStart="@dimen/theme_padding_preview"
                    android:layout_marginEnd="@dimen/theme_padding_preview"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@id/theme_toolbar"
                    app:layout_constraintBottom_toTopOf="@id/theme_primary_text"
                    tools:ignore="ContentDescription" />

                <ImageView
                    android:id="@+id/theme_primary_text"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/theme_text_preview"
                    android:layout_marginStart="@dimen/theme_padding_preview"
                    android:layout_marginEnd="@dimen/theme_primary_margin_end"
                    android:layout_marginTop="@dimen/theme_text_padding_preview"
                    android:src="@drawable/rounded_preview_rect"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@id/theme_hero_image"
                    app:tint="?android:attr/textColorPrimary"
                    tools:ignore="ContentDescription" />

                <ImageView
                    android:id="@+id/theme_accented_button"
                    android:src="@drawable/oval"
                    android:layout_width="@dimen/theme_accent_width_preview"
                    android:layout_height="@dimen/theme_text_preview"
                    app:tint="?colorAccent"
                    android:layout_marginStart="3dp"
                    app:layout_constraintTop_toTopOf="@id/theme_primary_text"
                    app:layout_constraintBottom_toBottomOf="@id/theme_primary_text"
                    app:layout_constraintStart_toEndOf="@id/theme_primary_text"
                    tools:ignore="ContentDescription" />

                <ImageView
                    android:id="@+id/theme_secondary_text"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/theme_text_preview"
                    android:layout_marginStart="@dimen/theme_padding_preview"
                    android:layout_marginTop="@dimen/theme_text_padding_preview"
                    android:layout_marginEnd="@dimen/theme_secondary_margin_end"
                    android:src="@drawable/rounded_preview_rect"
                    app:layout_constraintEnd_toStartOf="@id/theme_secondary_text_2"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@id/theme_primary_text"
                    app:tint="?android:attr/textColorSecondary"
                    tools:ignore="ContentDescription" />

                <ImageView
                    android:id="@+id/theme_secondary_text_2"
                    android:layout_width="27dp"
                    android:layout_height="@dimen/theme_text_preview"
                    android:layout_marginStart="3dp"
                    android:src="@drawable/rounded_preview_rect"
                    app:layout_constraintBottom_toBottomOf="@id/theme_secondary_text"
                    app:layout_constraintStart_toEndOf="@id/theme_secondary_text"
                    app:layout_constraintTop_toTopOf="@id/theme_secondary_text"
                    app:tint="?android:attr/textColorSecondary"
                    tools:ignore="ContentDescription" />


                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/theme_bottom_bar"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/theme_bottom_bar_preview"
                    android:background="?colorPrimaryVariant"
                    android:elevation="2dp"
                    android:orientation="horizontal"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintHorizontal_bias="0.0"
                    app:layout_constraintStart_toStartOf="parent">

                    <ImageView
                        android:id="@+id/theme_item_1"
                        android:layout_width="@dimen/theme_bottom_item_preview"
                        android:layout_height="@dimen/theme_bottom_item_preview"
                        android:src="@drawable/oval"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toStartOf="@id/theme_item_2"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent"
                        app:tint="?attr/tabBarIconInactive"
                        tools:ignore="ContentDescription" />

                    <ImageView
                        android:id="@+id/theme_item_2"
                        android:layout_width="@dimen/theme_bottom_item_preview"
                        android:layout_height="@dimen/theme_bottom_item_preview"
                        android:src="@drawable/oval"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toStartOf="@id/theme_item_3"
                        app:layout_constraintStart_toEndOf="@id/theme_item_1"
                        app:layout_constraintTop_toTopOf="parent"
                        app:tint="?attr/tabBarIconColor"
                        tools:ignore="ContentDescription" />

                    <ImageView
                        android:id="@+id/theme_item_3"
                        android:layout_width="@dimen/theme_bottom_item_preview"
                        android:layout_height="@dimen/theme_bottom_item_preview"
                        android:src="@drawable/oval"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toEndOf="@id/theme_item_2"
                        app:layout_constraintTop_toTopOf="parent"
                        app:tint="?attr/tabBarIconInactive"
                        tools:ignore="ContentDescription" />
                </androidx.constraintlayout.widget.ConstraintLayout>
            </androidx.constraintlayout.widget.ConstraintLayout>

            <ImageView
                android:id="@+id/checkbox"
                android:background="@drawable/oval"
                android:backgroundTint="@android:color/white"
                android:layout_width="20dp"
                android:layout_height="20dp"
                android:contentDescription="@string/select_all"
                android:src="@drawable/ic_check_circle_24dp"
                app:tint="?attr/colorAccent"
                android:layout_marginEnd="4dp"
                android:layout_marginTop="4dp"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintEnd_toEndOf="parent"/>
        </androidx.constraintlayout.widget.ConstraintLayout>
    </com.google.android.material.card.MaterialCardView>

    <com.google.android.material.textview.MaterialTextView
        android:id="@+id/theme_name_text"
        android:layout_width="0dp"
        android:layout_height="32sp"
        android:maxLines="3"
        android:layout_marginTop="2dp"
        android:textAlignment="center"
        android:layout_marginStart="6dp"
        android:layout_marginEnd="6dp"
        android:textAppearance="@style/TextAppearance.MaterialComponents.Caption"
        app:layout_constraintTop_toBottomOf="@id/theme_selected"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        tools:text="Theme Name" />
</androidx.constraintlayout.widget.ConstraintLayout>