From 6d80b7d676b9a68e62b65f8e5d12e9e02dbf341f Mon Sep 17 00:00:00 2001 From: Maryam Date: Tue, 9 Aug 2022 12:50:46 -0700 Subject: [PATCH] Adding A Minimize Button Added minimize button in the new WM shell to current caption and set its visibility to gone since Andoid UX is still debating on whether they will have it on by default in captions. Bug: 242094334 Test: Used acloud to visualize and manually test changes Change-Id: Iabeb0e94ae4adb2009dcfe7a365f9c8c9a7aa38f --- .../drawable/decor_minimize_button_dark.xml | 24 +++++++++++++++++++ .../res/layout/caption_window_decoration.xml | 12 +++++++++- .../Shell/res/values/strings.xml | 2 ++ .../FreeformTaskTransitionHandler.java | 16 +++++++++++++ .../FreeformTaskTransitionStarter.java | 11 ++++++++- .../CaptionWindowDecorViewModel.java | 9 ++++++- .../windowdecor/CaptionWindowDecoration.java | 3 ++- 7 files changed, 73 insertions(+), 4 deletions(-) create mode 100644 libs/WindowManager/Shell/res/drawable/decor_minimize_button_dark.xml diff --git a/libs/WindowManager/Shell/res/drawable/decor_minimize_button_dark.xml b/libs/WindowManager/Shell/res/drawable/decor_minimize_button_dark.xml new file mode 100644 index 0000000000000..0bcaa530dc803 --- /dev/null +++ b/libs/WindowManager/Shell/res/drawable/decor_minimize_button_dark.xml @@ -0,0 +1,24 @@ + + + + diff --git a/libs/WindowManager/Shell/res/layout/caption_window_decoration.xml b/libs/WindowManager/Shell/res/layout/caption_window_decoration.xml index a112f1933dd11..d183e42c173b0 100644 --- a/libs/WindowManager/Shell/res/layout/caption_window_decoration.xml +++ b/libs/WindowManager/Shell/res/layout/caption_window_decoration.xml @@ -21,6 +21,17 @@ android:layout_height="wrap_content" android:gravity="end" android:background="@drawable/decor_caption_title"> +