<?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"
    android:clipChildren="false"
    android:transitionGroup="true">

    <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.DisplayAspectRatioFrameLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:paddingTop="20dp"
        android:paddingBottom="40dp"
        android:clipChildren="false">

        <include
            android:id="@+id/lock_preview"
            layout="@layout/wallpaper_preview_card"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_gravity="center" />

        <com.android.customization.picker.clock.ui.view.ClockHostView
            android:id="@+id/clock_host_view"
            android:importantForAccessibility="noHideDescendants"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="center" />
    </com.android.wallpaper.picker.DisplayAspectRatioFrameLayout>

    <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:paddingBottom="36dp"
        android:clipChildren="false">

        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="22dp"
            android:layout_gravity="center_horizontal">

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/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>

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

            <LinearLayout
                android:id="@+id/color_picker_container"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:clipChildren="false">

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

                    <HorizontalScrollView
                        android:id="@+id/color_options_scroll_view"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:clipChildren="false"
                        android:scrollbars="none">

                        <LinearLayout
                            android:id="@+id/color_options"
                            android:clipToPadding="false"
                            android:clipChildren="false"
                            android:paddingHorizontal="16dp"
                            android:layout_marginBottom="16dp"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:orientation="horizontal"
                            android:divider="@drawable/horizontal_divider_8dp"
                            android:showDividers="middle" />
                    </HorizontalScrollView>

                    <!--
                        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.
                        -->
                    <include
                        layout="@layout/clock_color_option"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:visibility="invisible" />
                </FrameLayout>

                <SeekBar
                    android:id="@+id/slider"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:minHeight="48dp"
                    android:thumb="@null"
                    android:contentDescription="@string/accessibility_clock_slider_description"
                    android:background="@null"
                    android:paddingHorizontal="16dp"
                    android:progressDrawable="@drawable/saturation_progress_drawable"
                    android:splitTrack="false" />
            </LinearLayout>

            <RadioGroup
                android:id="@+id/clock_size_radio_button_group"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:layout_marginHorizontal="16dp">
                <!-- The radio button text is set when binding the view -->
                <RadioButton android:id="@+id/radio_dynamic"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingStart="8dp"
                    android:maxLines="3"
                    android:ellipsize="end"
                    android:singleLine="false"
                    android:layout_marginBottom="8dp"/>
                <!-- The radio button text is set when binding the view -->
                <RadioButton android:id="@+id/radio_small"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingStart="8dp"
                    android:maxLines="3"
                    android:ellipsize="end"
                    android:singleLine="false" />
            </RadioGroup>
        </FrameLayout>
    </LinearLayout>
</LinearLayout>
