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