<?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"
    android:padding="4dp"
    android:focusable="true"
    android:clickable="true"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:foreground="?attr/selectableItemBackground">
    <androidx.cardview.widget.CardView
        android:id="@+id/poster_card"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:cardCornerRadius="@dimen/radius_poster_mobile"
        app:cardElevation="2dp">
        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
            <ImageView
                android:id="@+id/poster_image"
                android:background="@color/mobile_surface_variant"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:scaleType="centerCrop"
                android:contentDescription="@string/movie"
                app:layout_constraintDimensionRatio="2:3"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"/>
            <TextView
                android:textSize="10sp"
                android:textColor="@android:color/white"
                android:ellipsize="end"
                android:id="@+id/title_overlay"
                android:background="@drawable/poster_title_bg"
                android:visibility="gone"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:maxLines="2"
                android:paddingHorizontal="6dp"
                android:paddingVertical="4dp"
                app:layout_constraintBottom_toBottomOf="@+id/poster_image"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"/>
            <View
                android:id="@+id/watch_progress_indicator"
                android:background="?attr/colorAccentPrimary"
                android:visibility="gone"
                android:layout_width="0dp"
                android:layout_height="3dp"
                app:layout_constraintBottom_toBottomOf="@+id/poster_image"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"/>
        </androidx.constraintlayout.widget.ConstraintLayout>
    </androidx.cardview.widget.CardView>
</FrameLayout>
