<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

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

        <de.danoeh.antennapod.ui.common.WrappingGridView
            android:id="@+id/discover_grid"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:numColumns="4"
            android:scrollbars="none"
            android:layout_marginTop="8dp"
            android:layout_centerInParent="true"
            android:layout_gravity="center_horizontal"
            android:layout_columnWeight="1"
            android:layout_rowWeight="1" />

        <LinearLayout
            android:id="@+id/errorContainer"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:gravity="center"
            android:orientation="vertical">

            <TextView
                android:id="@+id/errorLabel"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:layout_margin="16dp"
                android:textSize="@dimen/text_size_small"
                tools:text="Error message"
                tools:background="@android:color/holo_red_light" />

            <Button
                android:id="@+id/errorRetryButton"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="16dp"
                android:text="@string/retry_label"
                tools:background="@android:color/holo_red_light" />

        </LinearLayout>

    </RelativeLayout>

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

        <TextView
            android:id="@+id/poweredByLabel"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="@string/discover_powered_by_itunes"
            android:paddingHorizontal="4dp"
            style="@style/TextAppearance.Material3.BodySmall" />

        <Button
            android:id="@+id/discover_more"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:minHeight="40dp"
            android:minWidth="0dp"
            android:text="@string/discover_more"
            style="@style/Widget.MaterialComponents.Button.TextButton" />

    </LinearLayout>

</LinearLayout>
