• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?><!--
2  ~ Copyright (C) 2023 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:paddingBottom="62dp"
57        android:clipChildren="false">
58
59        <FrameLayout
60            android:layout_width="match_parent"
61            android:layout_height="wrap_content"
62            android:layout_marginTop="22dp"
63            android:clipChildren="false">
64
65            <androidx.recyclerview.widget.RecyclerView
66                android:id="@id/options"
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                android:clipChildren="false" />
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/grid_option_2"
85                android:layout_width="wrap_content"
86                android:layout_height="wrap_content"
87                android:visibility="invisible" />
88
89        </FrameLayout>
90
91        <Button
92            android:id="@+id/apply_button"
93            android:layout_width="wrap_content"
94            android:layout_height="wrap_content"
95            android:layout_gravity="center_horizontal"
96            android:visibility="gone"
97            android:enabled="false"
98            style="@style/ActionPrimaryButton"
99            android:text="@string/apply_btn" />
100
101        <TextView
102            android:id="@+id/apply_button_note"
103            android:layout_width="wrap_content"
104            android:layout_height="wrap_content"
105            android:layout_gravity="center_horizontal"
106            android:textSize="@dimen/grid_apply_button_note_text_size"
107            android:visibility="gone"
108            android:text="@string/apply_grid_btn_note" />
109    </LinearLayout>
110
111</LinearLayout>
112