Merge "PiP: Enable enter split." into sc-v2-dev am: b61f021774

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16241620

Change-Id: I1206fe1c37ed17e1599d88a23112cf399ab70a2d
This commit is contained in:
Ben Lin
2021-11-12 18:01:58 +00:00
committed by Automerger Merge Worker
4 changed files with 36 additions and 4 deletions

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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;