diff options
| author | 2021-11-12 17:47:00 +0000 | |
|---|---|---|
| committer | 2021-11-12 17:47:00 +0000 | |
| commit | b61f0217748e4b14a73f1fc235739c9eee267437 (patch) | |
| tree | 286b4d6d32c92be13161e412c582c5c36c62961d | |
| parent | c19c6d4b3c8fbd7a9fb22546c2cff5ad3cb6cbf2 (diff) | |
| parent | 6d6a81b5e8326d248531d1e103a5aa0408376b39 (diff) | |
Merge "PiP: Enable enter split." into sc-v2-dev
4 files changed, 36 insertions, 4 deletions
diff --git a/libs/WindowManager/Shell/res/drawable/pip_split.xml b/libs/WindowManager/Shell/res/drawable/pip_split.xml new file mode 100644 index 000000000000..2cfdf6ed259b --- /dev/null +++ b/libs/WindowManager/Shell/res/drawable/pip_split.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2021 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. + --> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="@dimen/pip_expand_action_inner_size" + android:height="@dimen/pip_expand_action_inner_size" + android:viewportWidth="24" + android:viewportHeight="24"> + + <path + android:fillColor="#FFFFFF" + android:pathData="M20,18h-5V6h5V18z M22,18V6c0-1.1-0.9-2-2-2h-5c-1.1,0-2,0.9-2,2v12c0,1.1,0.9,2,2,2h5C21.1,20,22,19.1,22,18z M9,18H4V6h5 + V18z M11,18V6c0-1.1-0.9-2-2-2H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h5C10.1,20,11,19.1,11,18z" /> +</vector> diff --git a/libs/WindowManager/Shell/res/layout/pip_menu.xml b/libs/WindowManager/Shell/res/layout/pip_menu.xml index 7dc2f31e9871..1dd17bad155b 100644 --- a/libs/WindowManager/Shell/res/layout/pip_menu.xml +++ b/libs/WindowManager/Shell/res/layout/pip_menu.xml @@ -81,12 +81,13 @@ <ImageButton android:id="@+id/enter_split" - android:layout_width="@dimen/pip_action_size" - android:layout_height="@dimen/pip_action_size" + android:layout_width="@dimen/pip_split_icon_size" + android:layout_height="@dimen/pip_split_icon_size" android:layout_gravity="top|start" + android:layout_margin="@dimen/pip_split_icon_margin" android:gravity="center" android:contentDescription="@string/pip_phone_enter_split" - android:src="@drawable/pip_expand" + android:src="@drawable/pip_split" android:background="?android:selectableItemBackgroundBorderless" /> </LinearLayout> diff --git a/libs/WindowManager/Shell/res/values/dimen.xml b/libs/WindowManager/Shell/res/values/dimen.xml index e9b9ec3f7d89..9e77578eafd8 100644 --- a/libs/WindowManager/Shell/res/values/dimen.xml +++ b/libs/WindowManager/Shell/res/values/dimen.xml @@ -67,6 +67,10 @@ <dimen name="pip_resize_handle_margin">4dp</dimen> <dimen name="pip_resize_handle_padding">0dp</dimen> + <!-- PIP Split icon size and margin. --> + <dimen name="pip_split_icon_size">24dp</dimen> + <dimen name="pip_split_icon_margin">12dp</dimen> + <!-- PIP stash offset size, which is the width of visible PIP region when stashed. --> <dimen name="pip_stash_offset">32dp</dimen> diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java index 7bbebe5bf287..b209699c1a19 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java @@ -99,7 +99,7 @@ public class PipMenuView extends FrameLayout { private static final float MENU_BACKGROUND_ALPHA = 0.3f; private static final float DISABLED_ACTION_ALPHA = 0.54f; - private static final boolean ENABLE_ENTER_SPLIT = false; + private static final boolean ENABLE_ENTER_SPLIT = true; private int mMenuState; private boolean mAllowMenuTimeout = true; |