<?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:background="@android:color/black"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <ImageView
        android:id="@+id/hero_backdrop"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="centerCrop"/>
    <ImageView
        android:id="@+id/hero_backdrop_incoming"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="centerCrop"
        android:alpha="0"/>
    <View
        android:id="@+id/ambient_background_overlay"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>
    <View
        android:id="@+id/sidecar_scrim"
        android:background="@drawable/sidecar_scrim_gradient"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>
    <com.strmr.ps.ui.widget.FadingImageView
        android:id="@+id/hero_sidecar"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="centerCrop"
        android:alpha="0"/>
    <View
        android:background="@drawable/fullscreen_gradient"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>
    <View
        android:id="@+id/background_dim_overlay"
        android:background="@android:color/black"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:alpha="0"/>
    <FrameLayout
        android:id="@+id/trakt_media_content"
        android:clipChildren="false"
        android:clipToPadding="false"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginStart="0dp">
        <LinearLayout
            android:orientation="vertical"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:weightSum="2">
            <LinearLayout
                android:gravity="top"
                android:orientation="vertical"
                android:id="@+id/hero_info_container"
                android:paddingTop="@dimen/layout_margin_top_hero_container"
                android:paddingBottom="@dimen/hero_container_padding_bottom"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_weight="1"
                android:paddingStart="@dimen/hero_container_padding_start"
                android:paddingEnd="@dimen/hero_container_padding_end">
                <ImageView
                    android:id="@+id/hero_logo"
                    android:visibility="gone"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/hero_logo_margin_top"
                    android:layout_marginBottom="@dimen/hero_logo_margin_bottom"
                    android:scaleType="fitCenter"
                    android:adjustViewBounds="true"
                    android:maxWidth="@dimen/hero_logo_max_width"
                    android:maxHeight="@dimen/hero_logo_max_height"
                    android:contentDescription="@string/hero_logo_content_description"/>
                <TextView
                    android:textSize="@dimen/hero_title_size"
                    android:textStyle="bold"
                    android:textColor="@android:color/white"
                    android:id="@+id/hero_title"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/hero_title_margin_top"
                    android:shadowColor="#cc000000"
                    android:shadowDx="0"
                    android:shadowDy="4"
                    android:shadowRadius="12"/>
                <TextView
                    android:textSize="15sp"
                    android:textStyle="italic"
                    android:textColor="#b3ffffff"
                    android:ellipsize="end"
                    android:id="@+id/hero_tagline"
                    android:visibility="gone"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="4dp"
                    android:maxLines="2"
                    android:shadowColor="#cc000000"
                    android:shadowDx="0"
                    android:shadowDy="4"
                    android:shadowRadius="12"/>
                <TextView
                    android:textSize="@dimen/hero_metadata_size"
                    android:textColor="#f0ffffff"
                    android:id="@+id/hero_metadata"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/hero_metadata_margin_top"
                    android:shadowColor="#cc000000"
                    android:shadowDx="0"
                    android:shadowDy="4"
                    android:shadowRadius="12"/>
                <TextView
                    android:textSize="@dimen/hero_genre_size"
                    android:textColor="@android:color/white"
                    android:id="@+id/hero_genre_text"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/hero_genre_margin_top"
                    android:shadowColor="#cc000000"
                    android:shadowDx="0"
                    android:shadowDy="4"
                    android:shadowRadius="12"/>
                <com.strmr.ps.ui.widget.AutoScrollTextView
                    android:textSize="@dimen/hero_overview_size"
                    android:textColor="@android:color/white"
                    android:id="@+id/hero_overview"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/hero_overview_height"
                    android:layout_marginTop="@dimen/hero_overview_margin_top"
                    android:shadowColor="#cc000000"
                    android:shadowDx="0"
                    android:shadowDy="4"
                    android:shadowRadius="12"
                    android:layout_marginEnd="@dimen/hero_overview_margin_end"/>
                <TextView
                    android:textSize="@dimen/hero_cast_size"
                    android:textColor="@android:color/white"
                    android:id="@+id/hero_cast"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/hero_cast_margin_top"
                    android:shadowColor="#cc000000"
                    android:shadowDx="0"
                    android:shadowDy="4"
                    android:shadowRadius="12"/>
            </LinearLayout>
            <androidx.leanback.widget.VerticalGridView
                android:gravity="bottom|center_horizontal"
                android:id="@+id/content_rows"
                android:scrollbars="none"
                android:clipChildren="false"
                android:clipToPadding="false"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_marginBottom="32dp"
                android:layout_weight="1"/>
        </LinearLayout>
    </FrameLayout>
    <ProgressBar
        android:layout_gravity="center"
        android:id="@+id/loading_indicator"
        android:visibility="gone"
        android:layout_width="64dp"
        android:layout_height="64dp"/>
</FrameLayout>
