<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (C) 2023 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  ~
  -->

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <FrameLayout
        android:id="@+id/section_header_container"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <include layout="@layout/section_header" />

    </FrameLayout>

    <com.android.wallpaper.picker.DisplayAspectRatioLinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:layout_marginHorizontal="24dp"
        android:paddingTop="20dp"
        android:paddingBottom="40dp"
        android:orientation="horizontal"
        android:gravity="center_vertical">

        <include
            android:id="@+id/lock_preview"
            layout="@layout/wallpaper_preview_card"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>

        <include
            android:id="@+id/home_preview"
            layout="@layout/wallpaper_preview_card"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>
    </com.android.wallpaper.picker.DisplayAspectRatioLinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:layout_marginHorizontal="24dp"
        android:layout_marginBottom="28dp"
        android:background="@drawable/picker_fragment_background"
        android:paddingTop="22dp"
        android:clipChildren="false">

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

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/color_type_tabs"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:clipToPadding="false"
                android:paddingHorizontal="16dp"
                android:layout_gravity="center_horizontal"/>

            <!--
            This is just an invisible placeholder put in place so that the parent keeps its height
            stable as the RecyclerView updates from 0 items to N items. Keeping it stable allows the
            layout logic to keep the size of the preview container stable as well, which bodes well
            for setting up the SurfaceView for remote rendering without changing its size after the
            content is loaded into the RecyclerView.

            It's critical for any TextViews inside the included layout to have text.
            -->
            <include
                layout="@layout/picker_fragment_tab"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:visibility="invisible" />

        </FrameLayout>

        <View
            android:layout_width="0dp"
            android:layout_height="6dp" />

        <TextView
            android:id="@+id/color_type_tab_subhead"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:textColor="@color/system_on_surface_variant"
            android:textSize="12sp"
            android:gravity="center"
            android:paddingHorizontal="16dp"/>

        <View
            android:layout_width="0dp"
            android:layout_height="8dp" />

        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:clipChildren="false">

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/color_options"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:clipToPadding="false"
                android:paddingHorizontal="16dp"
                android:clipChildren="false" />

            <!--
            This is just an invisible placeholder put in place so that the parent keeps its height
            stable as the RecyclerView updates from 0 items to N items. Keeping it stable allows the
            layout logic to keep the size of the preview container stable as well, which bodes well
            for setting up the SurfaceView for remote rendering without changing its size after the
            content is loaded into the RecyclerView.

            It's critical for any TextViews inside the included layout to have text.
            -->
            <include
                layout="@layout/color_option"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:visibility="invisible" />

        </FrameLayout>

        <FrameLayout
            android:id="@+id/dark_mode_toggle_container"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

    </LinearLayout>

</LinearLayout>
