1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright (C) 2022 The Android Open Source Project 4 5 Licensed under the Apache License, Version 2.0 (the "License"); 6 you may not use this file except in compliance with the License. 7 You may obtain a copy of the License at 8 9 http://www.apache.org/licenses/LICENSE-2.0 10 11 Unless required by applicable law or agreed to in writing, software 12 distributed under the License is distributed on an "AS IS" BASIS, 13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 See the License for the specific language governing permissions and 15 limitations under the License. 16--> 17<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" 18 xmlns:app="http://schemas.android.com/apk/res-auto" 19 android:layout_width="match_parent" 20 android:layout_height="match_parent"> 21 22 <com.android.wallpaper.picker.TouchForwardingLayout 23 android:id="@+id/touch_forwarding_layout" 24 android:layout_width="match_parent" 25 android:layout_height="match_parent" 26 android:background="@android:color/transparent" 27 android:contentDescription="@string/preview_screen_description"/> 28 29 <FrameLayout 30 android:id="@+id/hide_floating_sheet_touch_layout" 31 android:layout_width="match_parent" 32 android:layout_height="match_parent" 33 android:background="@android:color/transparent" 34 android:clickable="true"/> 35 36 <include layout="@layout/wallpaper_preview" /> 37 38 <View 39 android:id="@+id/preview_scrim" 40 android:layout_width="match_parent" 41 android:layout_height="match_parent" 42 android:background="@drawable/gradient_black_scrim" 43 android:importantForAccessibility="noHideDescendants" /> 44 45 <androidx.constraintlayout.widget.ConstraintLayout 46 android:layout_width="match_parent" 47 android:layout_height="match_parent" 48 android:background="@android:color/transparent" 49 android:fitsSystemWindows="true"> 50 51 <Toolbar 52 android:id="@+id/toolbar" 53 android:layout_width="0dp" 54 android:layout_height="?android:attr/actionBarSize" 55 app:layout_constraintTop_toTopOf="parent" 56 app:layout_constraintStart_toStartOf="parent" 57 app:layout_constraintEnd_toStartOf="@+id/barrier_start" /> 58 59 <FrameLayout 60 android:id="@+id/button_set_wallpaper_container" 61 android:layout_width="wrap_content" 62 android:layout_height="wrap_content" 63 android:minHeight="@dimen/set_wallpaper_button_min_height" 64 android:elevation="@dimen/wallpaper_preview_buttons_elevation" 65 android:layout_gravity="center_vertical" 66 android:gravity="center" 67 android:clickable="true" 68 android:layout_marginEnd="@dimen/set_wallpaper_button_margin_end" 69 app:layout_constraintEnd_toEndOf="parent" 70 app:layout_constraintTop_toTopOf="@+id/toolbar" 71 app:layout_constraintBottom_toBottomOf="@+id/toolbar"> 72 <Button 73 android:id="@+id/button_set_wallpaper" 74 android:layout_width="wrap_content" 75 android:layout_height="wrap_content" 76 android:layout_gravity="center_vertical" 77 android:background="@drawable/set_wallpaper_button_background" 78 android:text="@string/set_wallpaper_button_text" 79 android:textColor="@color/text_color_on_accent"/> 80 </FrameLayout> 81 82 <Button 83 android:id="@+id/exit_full_preview_button" 84 android:contentDescription="@string/show_preview_controls_action" 85 android:layout_width="@dimen/wallpaper_control_button_size" 86 android:layout_height="@dimen/wallpaper_control_button_size" 87 android:layout_gravity="center_vertical" 88 android:foreground="@drawable/exit_full_preview_cross" 89 android:elevation="@dimen/wallpaper_preview_buttons_elevation" 90 android:gravity="center" 91 android:layout_marginEnd="@dimen/set_wallpaper_button_margin_end" 92 android:visibility="gone" 93 android:clickable="true" 94 app:layout_constraintEnd_toEndOf="parent" 95 app:layout_constraintTop_toTopOf="@+id/toolbar" 96 app:layout_constraintBottom_toBottomOf="@+id/toolbar" /> 97 98 <com.android.wallpaper.widget.WallpaperDownloadButton 99 android:id="@+id/button_download_wallpaper" 100 android:layout_width="@dimen/wallpaper_control_button_size" 101 android:layout_height="@dimen/wallpaper_control_button_size" 102 android:layout_marginEnd="@dimen/wallpaper_control_button_group_margin_end" 103 android:elevation="@dimen/wallpaper_preview_buttons_elevation" 104 app:layout_constraintEnd_toEndOf="parent" 105 app:layout_constraintTop_toTopOf="@+id/toolbar" 106 app:layout_constraintBottom_toBottomOf="@+id/toolbar" 107 android:visibility="gone"/> 108 109 <androidx.constraintlayout.widget.Barrier 110 android:id="@+id/barrier_start" 111 android:layout_width="wrap_content" 112 android:layout_height="wrap_content" 113 app:barrierDirection="start" 114 app:constraint_referenced_ids="button_set_wallpaper_container, button_download_wallpaper" /> 115 116 <androidx.constraintlayout.widget.Barrier 117 android:id="@+id/barrier_bottom" 118 android:layout_width="wrap_content" 119 android:layout_height="wrap_content" 120 app:barrierDirection="bottom" 121 app:constraint_referenced_ids="button_set_wallpaper_container, button_download_wallpaper" /> 122 123 <com.android.wallpaper.widget.WallpaperControlButtonGroup 124 android:id="@+id/wallpaper_control_button_group" 125 android:layout_width="wrap_content" 126 android:layout_height="wrap_content" 127 android:layout_marginTop="@dimen/wallpaper_control_button_group_margin_top" 128 android:layout_marginEnd="@dimen/wallpaper_control_button_group_margin_end" 129 app:layout_constraintEnd_toEndOf="parent" 130 app:layout_constraintTop_toBottomOf="@+id/barrier_bottom"/> 131 132 <com.android.wallpaper.widget.DuoTabs 133 android:id="@+id/overlay_tabs" 134 android:layout_width="match_parent" 135 android:layout_height="wrap_content" 136 android:paddingHorizontal="@dimen/full_preview_page_tabs_horizontal_padding" 137 app:layout_constraintBottom_toBottomOf="parent" 138 app:layout_constraintStart_toStartOf="parent" 139 app:layout_constraintEnd_toEndOf="parent" /> 140 141 <ProgressBar 142 android:id="@+id/action_progress" 143 android:layout_width="@dimen/effect_generating_progress_bar_size" 144 android:layout_height="@dimen/effect_generating_progress_bar_size" 145 android:indeterminateTint="?android:attr/textColorSecondary" 146 android:visibility="gone" 147 app:layout_constraintBottom_toBottomOf="parent" 148 app:layout_constraintEnd_toEndOf="parent" 149 app:layout_constraintTop_toTopOf="parent" 150 app:layout_constraintStart_toStartOf="parent" /> 151 </androidx.constraintlayout.widget.ConstraintLayout> 152 153 <com.android.wallpaper.widget.FloatingSheet 154 android:id="@+id/floating_sheet" 155 android:layout_height="match_parent" 156 android:layout_width="match_parent" /> 157 158</FrameLayout> 159