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

    <ImageView
        android:id="@+id/widget_bg"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:contentDescription="@null"
        android:scaleType="fitXY"
        android:src="@drawable/widget_background" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:padding="12dp">

        <LinearLayout
            android:id="@+id/shelf_header"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <TextView
                android:id="@+id/shelf_title"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="4dp"
                android:layout_weight="1"
                android:ellipsize="end"
                android:maxLines="1"
                android:text="@string/widget_shelf_recent"
                android:textColor="@color/widget_text_primary"
                android:textSize="13sp"
                android:textStyle="bold" />

            <ImageView
                android:id="@+id/shelf_refresh"
                android:layout_width="20dp"
                android:layout_height="20dp"
                android:contentDescription="@string/widget_shelf_refresh"
                android:src="@drawable/ic_widget_refresh" />
        </LinearLayout>

        <TextView
            android:id="@+id/shelf_empty"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:gravity="center"
            android:padding="12dp"
            android:text="@string/widget_shelf_empty"
            android:textColor="@color/widget_text_secondary"
            android:textSize="13sp"
            android:visibility="gone" />

        <GridView
            android:id="@+id/shelf_grid"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:columnWidth="96dp"
            android:horizontalSpacing="6dp"
            android:numColumns="auto_fit"
            android:stretchMode="columnWidth"
            android:verticalSpacing="8dp" />
    </LinearLayout>
</FrameLayout>
