<?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:focusable="true"
    android:focusableInTouchMode="true"
    android:clipChildren="false"
    android:clipToPadding="false"
    android:layout_width="@dimen/poster_width_portrait"
    android:layout_height="@dimen/poster_height_portrait"
    android:layout_marginEnd="20dp">
    <androidx.cardview.widget.CardView
        android:id="@+id/poster_card"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:stateListAnimator="@null"
        app:cardBackgroundColor="@android:color/black"
        app:cardCornerRadius="@dimen/radius_poster"
        app:cardElevation="0dp"
        app:cardUseCompatPadding="false">
        <ImageView
            android:id="@+id/poster_image"
            android:background="@drawable/poster_card_background"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:scaleType="centerCrop"
            android:contentDescription="@null"
            android:clipToOutline="true"/>
        <ImageView
            android:id="@+id/expanded_backdrop"
            android:visibility="gone"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:scaleType="centerCrop"
            android:contentDescription="@null"
            android:alpha="0"/>
        <View
            android:id="@+id/expanded_scrim"
            android:background="@drawable/bg_trailer_loading_scrim"
            android:visibility="gone"
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>
        <ImageView
            android:layout_gravity="center"
            android:id="@+id/expanded_logo"
            android:visibility="gone"
            android:layout_width="match_parent"
            android:layout_height="64dp"
            android:scaleType="fitCenter"
            android:contentDescription="@null"
            android:alpha="0"
            android:layout_marginStart="12dp"
            android:layout_marginEnd="12dp"/>
        <TextView
            android:textSize="@dimen/text_hero_metadata"
            android:textColor="@android:color/white"
            android:ellipsize="end"
            android:layout_gravity="bottom"
            android:id="@+id/poster_title_overlay"
            android:background="@drawable/poster_title_bg"
            android:paddingTop="8dp"
            android:paddingBottom="10dp"
            android:visibility="gone"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:maxLines="2"
            android:paddingStart="12dp"
            android:paddingEnd="12dp"/>
        <View
            android:layout_gravity="bottom"
            android:id="@+id/progress_bar"
            android:background="@drawable/progress_bar_round_red"
            android:visibility="gone"
            android:layout_width="match_parent"
            android:layout_height="4dp"/>
    </androidx.cardview.widget.CardView>
    <View
        android:id="@+id/focus_overlay"
        android:background="@drawable/poster_focus_glow"
        android:visibility="invisible"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>
    <ImageView
        android:layout_gravity="end|top"
        android:id="@+id/watched_badge"
        android:visibility="gone"
        android:layout_width="28dp"
        android:layout_height="28dp"
        android:layout_marginTop="4dp"
        android:src="@drawable/ic_check_badge"
        android:contentDescription="@null"
        android:layout_marginEnd="4dp"/>
    <TextView
        android:textSize="9sp"
        android:textColor="@android:color/white"
        android:layout_gravity="start|top"
        android:id="@+id/episode_indicator_badge"
        android:background="@drawable/bg_episode_indicator"
        android:visibility="gone"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="4dp"
        android:fontFamily="sans-serif-medium"
        android:layout_marginStart="4dp"
        android:elevation="8dp"
        android:letterSpacing="0.05"
        android:paddingHorizontal="6dp"
        android:paddingVertical="2dp"/>
    <TextView
        android:textSize="10sp"
        android:textColor="@android:color/white"
        android:gravity="center"
        android:layout_gravity="end|top"
        android:id="@+id/unwatched_count_badge"
        android:background="@drawable/bg_unwatched_count"
        android:visibility="gone"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="6dp"
        android:minWidth="24dp"
        android:fontFamily="sans-serif-medium"
        android:layout_marginEnd="6dp"
        android:elevation="8dp"
        android:paddingHorizontal="5dp"
        android:paddingVertical="2dp"/>
</FrameLayout>
