1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2024 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<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" 17 xmlns:app="http://schemas.android.com/apk/res-auto" 18 xmlns:tools="http://schemas.android.com/tools" 19 android:id="@+id/root_view" 20 android:layout_width="match_parent" 21 android:layout_height="match_parent"> 22 23 <FrameLayout 24 android:id="@+id/nav_button" 25 android:layout_width="36dp" 26 android:layout_height="@dimen/wallpaper_control_button_size" 27 android:background="@drawable/nav_button_background" 28 android:layout_marginStart="@dimen/nav_button_start_margin" 29 app:layout_constraintStart_toStartOf="parent" 30 app:layout_constraintTop_toTopOf="@id/toolbar" 31 app:layout_constraintBottom_toBottomOf="@id/toolbar"> 32 <View 33 android:id="@+id/nav_button_icon" 34 android:layout_width="24dp" 35 android:layout_height="24dp" 36 android:background="@drawable/ic_close_24dp" 37 android:layout_gravity="center" /> 38 </FrameLayout> 39 40 <Toolbar 41 android:id="@+id/toolbar" 42 android:layout_width="0dp" 43 android:layout_height="?android:attr/actionBarSize" 44 android:theme="?android:attr/actionBarTheme" 45 android:importantForAccessibility="yes" 46 android:layout_gravity="top" 47 app:layout_constraintTop_toTopOf="parent" 48 app:layout_constraintStart_toEndOf="@+id/nav_button" 49 app:layout_constraintEnd_toStartOf="@+id/apply_button"> 50 <TextView 51 android:id="@+id/custom_toolbar_title" 52 android:layout_width="wrap_content" 53 android:layout_height="wrap_content" 54 android:ellipsize="end" 55 android:maxLines="1" 56 android:textAppearance="@style/CollapsingToolbar.Collapsed"/> 57 </Toolbar> 58 59 <Button 60 android:id="@+id/apply_button" 61 android:layout_width="wrap_content" 62 android:layout_height="wrap_content" 63 android:minHeight="@dimen/touch_target_min_height" 64 android:layout_marginEnd="@dimen/apply_button_end_margin" 65 android:background="@drawable/apply_button_background" 66 android:text="@string/apply_btn" 67 android:textColor="@color/system_on_primary" 68 android:textAppearance="@style/WallpaperPicker.Preview.TextAppearance.NoAllCaps" 69 app:layout_constraintEnd_toEndOf="parent" 70 app:layout_constraintTop_toTopOf="@id/toolbar" 71 app:layout_constraintBottom_toBottomOf="@id/toolbar"/> 72 73 <androidx.constraintlayout.motion.widget.MotionLayout 74 android:id="@+id/picker_motion_layout" 75 android:layout_width="0dp" 76 android:layout_height="0dp" 77 app:layout_constraintTop_toBottomOf="@+id/toolbar" 78 app:layout_constraintStart_toStartOf="parent" 79 app:layout_constraintEnd_toEndOf="parent" 80 app:layout_constraintBottom_toBottomOf="parent" 81 app:layoutDescription="@xml/customization_picker_layout_scene"> 82 83 <FrameLayout 84 android:id="@+id/preview_header" 85 android:layout_width="0dp" 86 android:layout_height="@dimen/customization_picker_preview_header_expanded_height" 87 app:layout_constraintTop_toTopOf="parent" 88 app:layout_constraintStart_toStartOf="parent" 89 app:layout_constraintEnd_toEndOf="parent" 90 android:paddingBottom="@dimen/customization_picker_preview_bottom_padding"> 91 92 <com.android.wallpaper.picker.preview.ui.view.ClickableMotionLayout 93 android:id="@+id/preview_pager" 94 android:layout_width="match_parent" 95 android:layout_height="match_parent" 96 app:layoutDescription="@xml/preview_pager_motion_scene"> 97 98 <TextView 99 android:id="@+id/label_placeholder" 100 android:layout_width="0dp" 101 android:layout_height="wrap_content" 102 android:paddingBottom="@dimen/customization_picker_preview_label_padding_bottom" 103 android:visibility="invisible" 104 android:text="Placeholder for the previews to position below it" 105 android:maxLines="1" 106 android:ellipsize="end" 107 tools:ignore="HardcodedText" /> 108 109 <FrameLayout 110 android:id="@+id/lock_preview_label_container" 111 android:layout_width="wrap_content" 112 android:layout_height="wrap_content" 113 android:paddingBottom="@dimen/customization_picker_preview_label_padding_bottom"> 114 115 <TextView 116 android:id="@+id/lock_preview_label" 117 android:layout_width="wrap_content" 118 android:layout_height="wrap_content" 119 android:paddingBottom="@dimen/customization_picker_preview_label_padding_bottom" 120 android:gravity="center" 121 android:layout_gravity="center" 122 android:textColor="@color/system_on_surface" 123 android:maxLines="1" 124 android:ellipsize="end" 125 android:text="@string/lock_screen_tab" /> 126 </FrameLayout> 127 128 <include layout="@layout/wallpaper_preview_card2" 129 android:id="@+id/lock_preview" /> 130 131 <FrameLayout 132 android:id="@+id/home_preview_label_container" 133 android:layout_width="wrap_content" 134 android:layout_height="wrap_content" 135 android:paddingBottom="@dimen/customization_picker_preview_label_padding_bottom"> 136 137 <TextView 138 android:id="@+id/home_preview_label" 139 android:layout_width="wrap_content" 140 android:layout_height="wrap_content" 141 android:gravity="center" 142 android:layout_gravity="center" 143 android:textColor="@color/system_on_surface" 144 android:maxLines="1" 145 android:ellipsize="end" 146 android:text="@string/home_screen_tab" /> 147 </FrameLayout> 148 149 150 <include layout="@layout/wallpaper_preview_card2" 151 android:id="@+id/home_preview" /> 152 153 <androidx.constraintlayout.widget.Guideline 154 android:id="@+id/guideline_center" 155 android:layout_width="wrap_content" 156 android:layout_height="wrap_content" 157 android:orientation="vertical" 158 app:layout_constraintGuide_percent="0.5" /> 159 </com.android.wallpaper.picker.preview.ui.view.ClickableMotionLayout> 160 161 <View 162 android:id="@+id/pager_touch_interceptor" 163 android:layout_width="match_parent" 164 android:layout_height="match_parent" 165 android:visibility="gone" 166 android:clickable="true" /> 167 168 <View 169 android:id="@+id/clock_face_click_delegate" 170 android:layout_width="match_parent" 171 android:layout_height="match_parent" 172 android:visibility="gone" 173 android:clickable="true" /> 174 </FrameLayout> 175 176 <androidx.core.widget.NestedScrollView 177 android:id="@+id/bottom_scroll_view" 178 android:layout_width="0dp" 179 android:layout_height="0dp" 180 app:layout_constraintTop_toBottomOf="@+id/preview_header" 181 app:layout_constraintStart_toStartOf="parent" 182 app:layout_constraintEnd_toEndOf="parent" 183 app:layout_constraintBottom_toBottomOf="parent"> 184 185 <androidx.constraintlayout.widget.ConstraintLayout 186 android:id="@+id/customization_option_container" 187 android:layout_width="match_parent" 188 android:layout_height="wrap_content" 189 android:paddingHorizontal="@dimen/customization_option_container_horizontal_padding"> 190 191 <com.android.wallpaper.picker.customization.ui.view.WallpaperPickerEntry 192 android:id="@+id/wallpaper_picker_entry" 193 android:layout_width="0dp" 194 android:layout_height="wrap_content" 195 app:layout_constraintTop_toTopOf="parent" 196 app:layout_constraintStart_toStartOf="parent" 197 app:layout_constraintEnd_toEndOf="parent"/> 198 199 <View 200 android:id="@+id/wallpaper_picker_entry_bottom_space" 201 android:layout_width="0dp" 202 android:layout_height="@dimen/wallpaper_picker_entry_bottom_space" 203 app:layout_constraintTop_toBottomOf="@+id/wallpaper_picker_entry" 204 app:layout_constraintStart_toStartOf="parent" 205 app:layout_constraintEnd_toEndOf="parent"/> 206 207 <LinearLayout 208 android:id="@+id/lock_customization_option_container" 209 android:layout_width="0dp" 210 android:layout_height="wrap_content" 211 android:showDividers="middle" 212 android:divider="@drawable/customization_option_entry_divider" 213 android:orientation="vertical" 214 app:layout_constraintStart_toStartOf="parent" 215 app:layout_constraintEnd_toEndOf="parent" 216 app:layout_constraintTop_toBottomOf="@+id/wallpaper_picker_entry_bottom_space" /> 217 218 <LinearLayout 219 android:id="@+id/home_customization_option_container" 220 android:layout_width="0dp" 221 android:layout_height="wrap_content" 222 android:showDividers="middle" 223 android:divider="@drawable/customization_option_entry_divider" 224 android:orientation="vertical" 225 app:layout_constraintStart_toStartOf="parent" 226 app:layout_constraintEnd_toEndOf="parent" 227 app:layout_constraintTop_toBottomOf="@+id/wallpaper_picker_entry_bottom_space" /> 228 </androidx.constraintlayout.widget.ConstraintLayout> 229 </androidx.core.widget.NestedScrollView> 230 231 <FrameLayout 232 android:id="@+id/customization_option_floating_sheet_container" 233 android:layout_width="0dp" 234 android:layout_height="wrap_content" 235 app:layout_constraintStart_toStartOf="parent" 236 app:layout_constraintEnd_toEndOf="parent" 237 app:layout_constraintTop_toBottomOf="parent" /> 238 </androidx.constraintlayout.motion.widget.MotionLayout> 239</androidx.constraintlayout.widget.ConstraintLayout> 240 241