diff options
author | George Lin <giolin@google.com> | 2023-03-21 23:07:35 +0000 |
---|---|---|
committer | George Lin <giolin@google.com> | 2023-03-22 19:49:25 +0000 |
commit | 8287ceacf07913b63f9a3dc85d7f56641c8656ac (patch) | |
tree | 984669b766ee806effc36691cb60ebf1d020ab66 | |
parent | 4e1ea35fa7e4b5764908093dff16fcdac52e9eef (diff) | |
download | WallpaperPicker2-8287ceacf07913b63f9a3dc85d7f56641c8656ac.tar.gz |
[WPP2] Improve full preview
1. Add a cross button when in full preview to hint that we can exit with
a tap
2. Make the black scrim darker. So that the smart space text is not too
distracting
3. When info sheet is expanding, also hide the black scrim
Test: https://drive.google.com/file/d/10XR2Pb-KbDCgAQmUwgeHn9fI_YpPqBhJ/view?usp=sharing&resourcekey=0-fXtotFlXLLhOWtJThkxY7g
Bug: 274184171
Change-Id: Id9fa9b510c12d4affc7c6cc050b7aff0a93e763e
-rw-r--r-- | res/drawable/exit_full_preview_cross.xml | 20 | ||||
-rw-r--r-- | res/drawable/ic_close.xml | 11 | ||||
-rw-r--r-- | res/layout/fragment_wallpaper_preview.xml | 15 | ||||
-rwxr-xr-x | res/values/colors.xml | 2 |
4 files changed, 47 insertions, 1 deletions
diff --git a/res/drawable/exit_full_preview_cross.xml b/res/drawable/exit_full_preview_cross.xml new file mode 100644 index 00000000..e3d341fe --- /dev/null +++ b/res/drawable/exit_full_preview_cross.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2022 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@drawable/wallpaper_control_button_on_background" /> + <item android:drawable="@drawable/ic_close" /> +</layer-list>
\ No newline at end of file diff --git a/res/drawable/ic_close.xml b/res/drawable/ic_close.xml new file mode 100644 index 00000000..bd0d8341 --- /dev/null +++ b/res/drawable/ic_close.xml @@ -0,0 +1,11 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="48dp" + android:height="48dp" + android:viewportWidth="960" + android:viewportHeight="960" + android:tintMode="multiply" + android:tint="@color/text_color_on_accent"> + <path + android:fillColor="@android:color/white" + android:pathData="M249,753L207,711L438,480L207,249L249,207L480,438L711,207L753,249L522,480L753,711L711,753L480,522L249,753Z"/> +</vector> diff --git a/res/layout/fragment_wallpaper_preview.xml b/res/layout/fragment_wallpaper_preview.xml index ed8e2bb5..cf0f52ca 100644 --- a/res/layout/fragment_wallpaper_preview.xml +++ b/res/layout/fragment_wallpaper_preview.xml @@ -70,6 +70,21 @@ app:layout_constraintTop_toTopOf="@+id/toolbar" app:layout_constraintBottom_toBottomOf="@+id/toolbar" /> + <View + android:id="@+id/exit_full_preview_button" + android:layout_width="@dimen/wallpaper_control_button_size" + android:layout_height="@dimen/wallpaper_control_button_size" + android:layout_gravity="center_vertical" + android:foreground="@drawable/exit_full_preview_cross" + android:elevation="@dimen/wallpaper_preview_buttons_elevation" + android:gravity="center" + android:layout_marginEnd="@dimen/set_wallpaper_button_margin_end" + android:visibility="gone" + android:clickable="true" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="@+id/toolbar" + app:layout_constraintBottom_toBottomOf="@+id/toolbar" /> + <com.android.wallpaper.widget.WallpaperDownloadButton android:id="@+id/button_download_wallpaper" android:layout_width="@dimen/wallpaper_control_button_size" diff --git a/res/values/colors.xml b/res/values/colors.xml index a2567ef2..ec437ad3 100755 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -55,5 +55,5 @@ <color name="text_color_secondary">@color/settingslib_text_color_secondary</color> <color name="text_color_secondary_inverse">@color/settingslib_text_color_secondary_device_default</color> - <color name="wallpaper_preview_scrim_color">#66000000</color> + <color name="wallpaper_preview_scrim_color">#99000000</color> </resources> |