mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
Second attempt at enabling this feature. See ag/25143701, linked bugs, and revert history for details. This patch is tested with mokey devices and does not crash! This patch includes: - Ability to "save app pair" from Overview Actions. - Internally the actions bar is not longer hidden for GroupedTasks; instead the individual buttons for "Select", "Screenshot", and "Split screen" are toggled off and "Save app pair" is toggled on. - "Save app pair" option does not appear in icon menu when it is visible in the Actions Bar. - Addition to go/quickstep/res/layout/overview_actions_container.xml to support addition of the new button. Note: This patch introduces a slight regression where users are now able to long-press to select text on task 1 of a paired GroupedTaskView (previously we did not let them select text on either task for consistency.) Will follow up with a fix -- see bug for details. Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD Fixes: 315545418 Fixes: 315292030 Test: Manual, all action buttons still work and "Save app pair" appears and disappears correctly Change-Id: I4b4ac525cfd5eb9cfcd757d0bffc7215b04f9a3d
80 lines
3.0 KiB
XML
80 lines
3.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
Copyright (C) 2020 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.
|
|
-->
|
|
<com.android.quickstep.views.OverviewActionsView xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_horizontal|bottom">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/action_buttons"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="@dimen/overview_actions_height"
|
|
android:layout_gravity="bottom|center_horizontal"
|
|
android:orientation="horizontal">
|
|
|
|
<Space
|
|
android:layout_width="0dp"
|
|
android:layout_height="1dp"
|
|
android:layout_weight="1" />
|
|
|
|
<Button
|
|
android:id="@+id/action_screenshot"
|
|
style="@style/OverviewActionButton"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:drawableStart="@drawable/ic_screenshot"
|
|
android:text="@string/action_screenshot"
|
|
android:theme="@style/ThemeControlHighlightWorkspaceColor" />
|
|
|
|
<Space
|
|
android:id="@+id/action_split_space"
|
|
android:layout_width="@dimen/overview_actions_button_spacing"
|
|
android:layout_height="1dp"
|
|
android:visibility="gone" />
|
|
|
|
<Button
|
|
android:id="@+id/action_split"
|
|
style="@style/OverviewActionButton"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/action_split"
|
|
android:theme="@style/ThemeControlHighlightWorkspaceColor"
|
|
android:visibility="gone" />
|
|
|
|
<Button
|
|
android:id="@+id/action_save_app_pair"
|
|
style="@style/OverviewActionButton"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/action_save_app_pair"
|
|
android:theme="@style/ThemeControlHighlightWorkspaceColor"
|
|
android:visibility="gone" />
|
|
|
|
<Space
|
|
android:layout_width="0dp"
|
|
android:layout_height="1dp"
|
|
android:layout_weight="1" />
|
|
|
|
<Space
|
|
android:id="@+id/oav_three_button_space"
|
|
android:layout_width="0dp"
|
|
android:layout_height="1dp"
|
|
android:layout_weight="1"
|
|
android:visibility="gone" />
|
|
</LinearLayout>
|
|
|
|
</com.android.quickstep.views.OverviewActionsView> |