<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/content_root"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:id="@+id/header"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:gravity="center_horizontal"
        android:orientation="vertical"
        android:paddingLeft="16dp"
        android:paddingRight="16dp">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/imgvCover"
                android:layout_width="@dimen/thumbnail_length_queue_item"
                android:layout_height="@dimen/thumbnail_length_queue_item"
                android:layout_gravity="center_vertical"
                android:contentDescription="@string/open_podcast"
                android:foreground="?attr/selectableItemBackground"
                tools:src="@tools:sample/avatars" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:layout_marginLeft="16dp"
                android:layout_marginStart="16dp">

                <TextView
                    android:id="@+id/txtvPodcast"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:foreground="?attr/selectableItemBackground"
                    android:importantForAccessibility="no"
                    style="@style/AntennaPod.TextView.ListItemSecondaryTitle"
                    tools:text="Podcast title" />

                <TextView
                    android:id="@+id/txtvTitle"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textSize="16sp"
                    android:textColor="?android:attr/textColorPrimary"
                    android:ellipsize="end"
                    android:maxLines="5"
                    tools:text="@sample/episodes.json/data/title" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">

                    <TextView
                        android:id="@+id/txtvDuration"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        style="@style/AntennaPod.TextView.ListItemSecondaryTitle"
                        tools:text="@sample/episodes.json/data/duration" />

                    <TextView
                        android:id="@+id/separatorIcons"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="4dp"
                        android:layout_marginStart="4dp"
                        android:layout_marginRight="4dp"
                        android:layout_marginEnd="4dp"
                        android:importantForAccessibility="no"
                        android:text="·"
                        style="@style/AntennaPod.TextView.ListItemSecondaryTitle" />

                    <TextView
                        android:id="@+id/txtvPublished"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        style="@style/AntennaPod.TextView.ListItemSecondaryTitle"
                        tools:text="Jan 23" />

                </LinearLayout>

            </LinearLayout>

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:gravity="center_vertical"
            android:baselineAligned="false">

            <LinearLayout
                android:id="@+id/butAction1"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:orientation="horizontal"
                android:background="?android:attr/selectableItemBackground"
                android:gravity="center">

                <ImageView
                    android:id="@+id/butAction1Icon"
                    android:layout_width="24dp"
                    android:layout_height="24dp"
                    android:layout_marginRight="8dp"
                    android:layout_marginEnd="8dp"
                    android:layout_marginTop="12dp"
                    android:layout_marginBottom="12dp"
                    tools:src="@drawable/ic_settings" />

                <TextView
                    android:id="@+id/butAction1Text"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textAppearance="@style/TextAppearance.AppCompat.Button"
                    android:textColor="?android:attr/textColorPrimary"
                    tools:text="Button 1" />

            </LinearLayout>

            <LinearLayout
                android:id="@+id/butAction2"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:orientation="horizontal"
                android:background="?android:attr/selectableItemBackground"
                android:gravity="center">

                <FrameLayout
                    android:layout_width="40dp"
                    android:layout_height="40dp"
                    android:layout_marginTop="4dp"
                    android:layout_marginBottom="4dp"
                    android:layout_gravity="bottom|end">

                    <de.danoeh.antennapod.ui.common.CircularProgressBar
                        android:id="@+id/circularProgressBar"
                        android:layout_width="36dp"
                        android:layout_height="36dp"
                        android:layout_gravity="center"
                        android:visibility="gone"
                        app:foregroundColor="?android:attr/textColorPrimary" />

                    <ImageView
                        android:id="@+id/butAction2Icon"
                        android:layout_width="24dp"
                        android:layout_height="24dp"
                        android:layout_gravity="center"
                        tools:src="@drawable/ic_settings" />

                </FrameLayout>

                <TextView
                    android:id="@+id/butAction2Text"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textAppearance="@style/TextAppearance.AppCompat.Button"
                    android:textColor="?android:attr/textColorPrimary"
                    tools:text="Button 2" />

            </LinearLayout>

        </LinearLayout>

        <TextView
            android:id="@+id/noMediaLabel"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:visibility="gone"
            android:textAlignment="center"
            android:background="?android:attr/dividerVertical"
            android:text="@string/no_media_label" />

        <View
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:background="?android:attr/dividerVertical" />

    </LinearLayout>

    <de.danoeh.antennapod.ui.view.NestedScrollableHost
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@id/header"
        app:preferVertical="3">

        <de.danoeh.antennapod.ui.view.ShownotesWebView
            android:id="@+id/webvDescription"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:foreground="?android:windowContentOverlay" />

    </de.danoeh.antennapod.ui.view.NestedScrollableHost>

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <ProgressBar
            android:id="@+id/progbarLoading"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:indeterminate="true" />

    </FrameLayout>

</RelativeLayout>
