• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?><!--
2  ~ Copyright (C) 2022 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  -->
17
18<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
19    android:layout_width="match_parent"
20    android:layout_height="match_parent"
21    android:orientation="vertical"
22    android:clipChildren="false"
23    android:transitionGroup="true">
24
25    <FrameLayout
26        android:id="@+id/section_header_container"
27        android:layout_width="match_parent"
28        android:layout_height="wrap_content">
29
30        <include layout="@layout/section_header" />
31
32    </FrameLayout>
33
34    <com.android.wallpaper.picker.DisplayAspectRatioFrameLayout
35        android:layout_width="match_parent"
36        android:layout_height="0dp"
37        android:layout_weight="1"
38        android:paddingTop="20dp"
39        android:paddingBottom="40dp">
40
41        <include
42            android:id="@+id/preview"
43            layout="@layout/wallpaper_preview_card"
44            android:layout_width="0dp"
45            android:layout_height="match_parent"
46            android:layout_gravity="center"/>
47
48    </com.android.wallpaper.picker.DisplayAspectRatioFrameLayout>
49
50    <LinearLayout
51        android:layout_width="match_parent"
52        android:layout_height="wrap_content"
53        android:orientation="vertical"
54        android:layout_marginHorizontal="24dp"
55        android:layout_marginBottom="28dp"
56        android:background="@drawable/picker_fragment_background"
57        android:paddingTop="22dp"
58        android:paddingBottom="62dp"
59        android:clipChildren="false">
60
61        <FrameLayout
62            android:layout_width="match_parent"
63            android:layout_height="wrap_content"
64            >
65
66            <androidx.recyclerview.widget.RecyclerView
67                android:id="@id/slot_tabs"
68                android:layout_width="wrap_content"
69                android:layout_height="wrap_content"
70                android:layout_gravity="center_horizontal"
71                android:clipToPadding="false"
72                android:paddingHorizontal="16dp" />
73
74            <!--
75            This is just an invisible placeholder put in place so that the parent keeps its height
76            stable as the RecyclerView updates from 0 items to N items. Keeping it stable allows the
77            layout logic to keep the size of the preview container stable as well, which bodes well
78            for setting up the SurfaceView for remote rendering without changing its size after the
79            content is loaded into the RecyclerView.
80
81            It's critical for any TextViews inside the included layout to have text.
82            -->
83            <include
84                layout="@layout/picker_fragment_tab"
85                android:layout_width="wrap_content"
86                android:layout_height="wrap_content"
87                android:visibility="invisible" />
88
89        </FrameLayout>
90
91        <View
92            android:layout_width="0dp"
93            android:layout_height="22dp" />
94
95        <FrameLayout
96            android:layout_width="match_parent"
97            android:layout_height="wrap_content"
98            android:clipChildren="false">
99
100            <androidx.recyclerview.widget.RecyclerView
101                android:id="@id/affordances"
102                android:layout_width="wrap_content"
103                android:layout_height="wrap_content"
104                android:layout_gravity="center_horizontal"
105                android:clipToPadding="false"
106                android:paddingHorizontal="16dp"
107                android:clipChildren="false" />
108
109            <!--
110            This is just an invisible placeholder put in place so that the parent keeps its height
111            stable as the RecyclerView updates from 0 items to N items. Keeping it stable allows the
112            layout logic to keep the size of the preview container stable as well, which bodes well
113            for setting up the SurfaceView for remote rendering without changing its size after the
114            content is loaded into the RecyclerView.
115
116            It's critical for any TextViews inside the included layout to have text.
117            -->
118            <include
119                layout="@layout/keyguard_quick_affordance"
120                android:layout_width="wrap_content"
121                android:layout_height="wrap_content"
122                android:visibility="invisible" />
123
124        </FrameLayout>
125
126    </LinearLayout>
127
128</LinearLayout>
129