From faf0af1fe4855ad05f1c7c24db8206d3e0ab420d Mon Sep 17 00:00:00 2001 From: Kunhung Li Date: Fri, 12 Apr 2019 17:16:53 +0800 Subject: Add preview checkbox for LivePicker Enable preview checkbox to hide bottom panel, otherwise to show it. Default behavior will show bottom panel with preview unchecked. Bug: 130383883 Test: Manual Test Change-Id: Ida5a5fa7ece501aefd906b70b6990eb89fe14c74 --- res/layout/live_wallpaper_preview.xml | 34 ++++---- res/layout/preview_action.xml | 24 ++++++ res/layout/set_wallpaper_action.xml | 24 ------ res/menu/menu_preview.xml | 5 ++ res/values/dimensions.xml | 1 + res/values/strings.xml | 10 +++ .../wallpaper/livepicker/LiveWallpaperPreview.java | 90 +++++++++++++++++++--- 7 files changed, 140 insertions(+), 48 deletions(-) create mode 100644 res/layout/preview_action.xml delete mode 100644 res/layout/set_wallpaper_action.xml diff --git a/res/layout/live_wallpaper_preview.xml b/res/layout/live_wallpaper_preview.xml index 0c35b68..b6bbd7c 100644 --- a/res/layout/live_wallpaper_preview.xml +++ b/res/layout/live_wallpaper_preview.xml @@ -46,29 +46,37 @@ android:layout_height="match_parent" android:fitsSystemWindows="true"> - - + android:background="@color/translucent_black" + android:orientation="vertical" + app:behavior_peekHeight="@dimen/preview_attribution_pane_collapsed_height" + app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"> - + + + - + - + + + diff --git a/res/layout/set_wallpaper_action.xml b/res/layout/set_wallpaper_action.xml deleted file mode 100644 index 02f4fcd..0000000 --- a/res/layout/set_wallpaper_action.xml +++ /dev/null @@ -1,24 +0,0 @@ - - -