• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?><!--
2  ~ Copyright (C) 2025 The Android Open Source Project
3  ~
4  ~ Licensed under the Apache License, Version 2.0 (the "License");
5  ~ you may not use this file except in compliance with the License.
6  ~ You may obtain a copy of the License at
7  ~
8  ~      http://www.apache.org/licenses/LICENSE-2.0
9  ~
10  ~ Unless required by applicable law or agreed to in writing, software
11  ~ distributed under the License is distributed on an "AS IS" BASIS,
12  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  ~ See the License for the specific language governing permissions and
14  ~ limitations under the License.
15  -->
16<FrameLayout  xmlns:android="http://schemas.android.com/apk/res/android"
17    xmlns:app="http://schemas.android.com/apk/res-auto"
18    android:id="@+id/wallpaper_picker_entry_background"
19    android:background="@drawable/wallpaper_picker_entry_background"
20    android:layout_width="match_parent"
21    android:layout_height="wrap_content"
22    android:clipToPadding="false"
23    android:clipChildren="false">
24
25    <androidx.constraintlayout.widget.ConstraintLayout
26        android:id="@+id/wallpaper_picker_entry_expanded_container"
27        android:layout_width="match_parent"
28        android:layout_height="wrap_content"
29        android:paddingTop="@dimen/customization_option_entry_vertical_padding_large"
30        android:paddingHorizontal="@dimen/customization_option_entry_horizontal_padding">
31
32        <FrameLayout
33            android:id="@+id/wallpaper_carousel_container"
34            android:layout_width="0dp"
35            android:layout_height="wrap_content"
36            app:layout_constraintTop_toTopOf="parent"
37            app:layout_constraintStart_toStartOf="parent"
38            app:layout_constraintEnd_toEndOf="parent">
39            <!--
40             This is an invisible placeholder put in place so that the parent keeps its height
41             stable as the RecyclerView updates from 0 items to N items. Keeping it stable allows
42             the layout logic to keep the size of the preview container stable as well, which
43             bodes well for setting up the SurfaceView for remote rendering without changing its
44             size after the content is loaded into the RecyclerView.
45
46             It's critical for any TextViews inside the included layout to have text.
47             -->
48            <include
49                layout="@layout/curated_photo_tile"
50                android:layout_width="@dimen/curated_photo_tile_width"
51                android:layout_height="@dimen/curated_photo_height"
52                android:visibility="invisible" />
53
54            <androidx.recyclerview.widget.RecyclerView
55                android:id="@+id/wallpaper_carousel"
56                android:layout_width="match_parent"
57                android:layout_height="match_parent"
58                android:clipToPadding="false"
59                android:clipChildren="false"
60                android:orientation="horizontal"
61                android:nestedScrollingEnabled="true" />
62        </FrameLayout>
63
64        <TextView
65            android:id="@+id/wallpaper_picker_entry_title"
66            android:layout_width="0dp"
67            android:layout_height="wrap_content"
68            android:minHeight="@dimen/accessibility_min_height"
69            android:gravity="start|center_vertical"
70            android:text="@string/choose_a_curated_photo_section_title"
71            android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small"
72            android:textSize="@dimen/wallpaper_header_text_size"
73            android:ellipsize="end"
74            android:singleLine="true"
75            app:layout_constraintTop_toBottomOf="@+id/wallpaper_carousel_container"
76            app:layout_constraintBottom_toBottomOf="parent"
77            app:layout_constraintStart_toStartOf="parent"
78            app:layout_constraintEnd_toStartOf="@+id/more_wallpapers_button" />
79
80        <TextView
81            android:id="@+id/more_wallpapers_button"
82            android:layout_width="0dp"
83            android:layout_height="wrap_content"
84            android:minHeight="@dimen/accessibility_min_height"
85            android:gravity="center"
86            android:drawablePadding="@dimen/wallpaper_picker_entry_button_drawable_padding"
87            android:text="@string/more_wallpapers"
88            android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small"
89            android:textColor="@color/system_primary"
90            android:textSize="@dimen/wallpaper_header_text_size"
91            app:layout_constraintTop_toBottomOf="@+id/wallpaper_carousel_container"
92            app:layout_constraintBottom_toBottomOf="parent"
93            app:layout_constraintEnd_toEndOf="parent"
94            app:drawableStartCompat="@drawable/ic_nav_wallpaper"
95            app:drawableTint="@color/system_primary"
96            android:clickable="true" />
97    </androidx.constraintlayout.widget.ConstraintLayout>
98
99    <TextView
100        android:id="@+id/customization_option_entry_wallpaper_collapsed_button"
101        android:layout_width="wrap_content"
102        android:layout_height="wrap_content"
103        android:minHeight="@dimen/accessibility_min_height"
104        android:gravity="center"
105        android:layout_gravity="center"
106        android:drawablePadding="@dimen/wallpaper_picker_entry_button_drawable_padding"
107        android:text="@string/wallpapers"
108        android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small"
109        android:textColor="@color/system_primary"
110        android:textSize="@dimen/wallpaper_header_text_size"
111        android:alpha="0.0"
112        android:visibility="invisible"
113        app:drawableStartCompat="@drawable/ic_nav_wallpaper"
114        app:drawableTint="@color/system_primary"
115        android:clickable="true" />
116</FrameLayout>
117
118