Simplifying options popup and overview handling
> Removing support for page drag-n-drop from pagedView
> Removing Overview UI from Launcher3 without quickstep and using options popup instead
> Removing touch handlers from CellLayouts and showing options popup based on workspace long press
> Excluding touch outside inset when showing the popup
Bug: 74136505
Change-Id: I34c2a7ff58452db26f5d1a85d554be40fc75f2b8
diff --git a/res/layout/longpress_options_menu.xml b/res/layout/longpress_options_menu.xml
new file mode 100644
index 0000000..71d117a
--- /dev/null
+++ b/res/layout/longpress_options_menu.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 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.launcher3.views.OptionsPopupView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:launcher="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:layout_height="96dp"
+ android:background="?attr/popupColorPrimary"
+ android:elevation="@dimen/deep_shortcuts_elevation"
+ android:orientation="horizontal"
+ launcher:layout_ignoreInsets="true">
+
+ <FrameLayout
+ android:id="@+id/wallpaper_button"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:background="?android:attr/selectableItemBackground">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:drawablePadding="4dp"
+ android:drawableTint="?android:attr/textColorPrimary"
+ android:drawableTop="@drawable/ic_wallpaper"
+ android:fontFamily="sans-serif-condensed"
+ android:gravity="center"
+ android:paddingLeft="16dp"
+ android:paddingRight="16dp"
+ android:text="@string/wallpaper_button_text"
+ android:textColor="?android:attr/textColorPrimary"
+ android:textSize="12sp"/>
+ </FrameLayout>
+
+ <FrameLayout
+ android:id="@+id/widget_button"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:background="?android:attr/selectableItemBackground">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:drawablePadding="4dp"
+ android:drawableTint="?android:attr/textColorPrimary"
+ android:drawableTop="@drawable/ic_widget"
+ android:fontFamily="sans-serif-condensed"
+ android:gravity="center"
+ android:paddingLeft="16dp"
+ android:paddingRight="16dp"
+ android:text="@string/widget_button_text"
+ android:textColor="?android:attr/textColorPrimary"
+ android:textSize="12sp"/>
+
+ </FrameLayout>
+
+ <FrameLayout
+ android:id="@+id/settings_button"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:background="?android:attr/selectableItemBackground">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:drawablePadding="4dp"
+ android:drawableTint="?android:attr/textColorPrimary"
+ android:drawableTop="@drawable/ic_setting"
+ android:fontFamily="sans-serif-condensed"
+ android:gravity="center"
+ android:paddingLeft="16dp"
+ android:paddingRight="16dp"
+ android:text="@string/settings_button_text"
+ android:textColor="?android:attr/textColorPrimary"
+ android:textSize="12sp"/>
+
+ </FrameLayout>
+
+</com.android.launcher3.views.OptionsPopupView>
\ No newline at end of file
diff --git a/res/layout/overview_panel.xml b/res/layout/overview_panel.xml
index c795b81..bdd5d23 100644
--- a/res/layout/overview_panel.xml
+++ b/res/layout/overview_panel.xml
@@ -14,61 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<com.android.launcher3.uioverrides.OverviewPanel
+<Space
xmlns:android="http://schemas.android.com/apk/res/android"
- android:theme="@style/HomeScreenElementTheme"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal|bottom"
- android:gravity="top"
- android:orientation="horizontal">
-
- <TextView
- android:id="@+id/wallpaper_button"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:drawablePadding="4dp"
- android:drawableTop="@drawable/ic_wallpaper"
- android:drawableTint="?attr/workspaceTextColor"
- android:fontFamily="sans-serif-condensed"
- android:gravity="center_horizontal"
- android:stateListAnimator="@animator/overview_button_anim"
- android:text="@string/wallpaper_button_text"
- android:textAllCaps="true"
- android:textColor="?attr/workspaceTextColor"
- android:textSize="12sp" />
-
- <TextView
- android:id="@+id/widget_button"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:drawablePadding="4dp"
- android:drawableTop="@drawable/ic_widget"
- android:drawableTint="?attr/workspaceTextColor"
- android:fontFamily="sans-serif-condensed"
- android:gravity="center_horizontal"
- android:stateListAnimator="@animator/overview_button_anim"
- android:text="@string/widget_button_text"
- android:textAllCaps="true"
- android:textColor="?attr/workspaceTextColor"
- android:textSize="12sp" />
-
- <TextView
- android:id="@+id/settings_button"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:drawablePadding="4dp"
- android:drawableTop="@drawable/ic_setting"
- android:drawableTint="?attr/workspaceTextColor"
- android:fontFamily="sans-serif-condensed"
- android:gravity="center_horizontal"
- android:stateListAnimator="@animator/overview_button_anim"
- android:text="@string/settings_button_text"
- android:textAllCaps="true"
- android:textColor="?attr/workspaceTextColor"
- android:textSize="12sp" />
-
-</com.android.launcher3.uioverrides.OverviewPanel>
\ No newline at end of file
+ android:layout_width="0dp"
+ android:layout_height="0dp" />
\ No newline at end of file
diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml
index 40ffffe..6cf23ad 100644
--- a/res/values-land/dimens.xml
+++ b/res/values-land/dimens.xml
@@ -25,7 +25,6 @@
<dimen name="fastscroll_popup_text_size">24dp</dimen>
<!-- Dynamic grid -->
- <dimen name="dynamic_grid_overview_bar_item_width">120dp</dimen>
<dimen name="dynamic_grid_min_page_indicator_size">48dp</dimen>
<dimen name="dynamic_grid_icon_drawable_padding">4dp</dimen>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 9f4233c..f8f9c2a 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -23,10 +23,6 @@
<dimen name="dynamic_grid_min_page_indicator_size">24dp</dimen>
<dimen name="dynamic_grid_page_indicator_line_height">1dp</dimen>
<dimen name="dynamic_grid_icon_drawable_padding">8dp</dimen>
- <dimen name="dynamic_grid_overview_min_icon_zone_height">80dp</dimen>
- <dimen name="dynamic_grid_overview_max_icon_zone_height">120dp</dimen>
- <dimen name="dynamic_grid_overview_bar_item_width">80dp</dimen>
- <dimen name="dynamic_grid_overview_bar_spacer_width">25dp</dimen>
<dimen name="dynamic_grid_workspace_top_padding">8dp</dimen>
<dimen name="dynamic_grid_workspace_page_spacing">8dp</dimen>
<!-- Minimum space between workspace and hotseat in spring loaded mode -->
@@ -227,5 +223,5 @@
<dimen name="swipe_helper_falsing_threshold">70dp</dimen>
<!-- Overview -->
- <dimen name="options_menu_icon_size">48dp</dimen>
+ <dimen name="options_menu_icon_size">24dp</dimen>
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index d8b68e7..57edc5a 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -169,8 +169,6 @@
<string name="settings_button_text">Home settings</string>
<!-- Message shown when a feature is disabled by the administrator -->
<string name="msg_disabled_by_admin">Disabled by your admin</string>
- <!-- Text for custom accessibility action to go to the overview mode, where users can look and change the overall UI of the launcher. -->
- <string name="accessibility_action_overview">Overview</string>
<!-- Strings for settings -->
<!-- Title for Notification dots setting. Tapping this will link to the system Notifications settings screen where the user can turn off notification dots globally. [CHAR LIMIT=50] -->
@@ -278,15 +276,6 @@
<!-- Accessibility action to move an item from folder to workspace. [CHAR_LIMIT=30] -->
<string name="action_move_to_workspace">Move to Home screen</string>
- <!-- Accessibility action to move an homescreen to the left. [CHAR_LIMIT=30] -->
- <string name="action_move_screen_left">Move screen to left</string>
-
- <!-- Accessibility action to move an homescreen to the right. [CHAR_LIMIT=30] -->
- <string name="action_move_screen_right">Move screen to right</string>
-
- <!-- Accessibility confirmation when a screen was moved. -->
- <string name="screen_moved">Screen moved</string>
-
<!-- Accessibility action to resize a widget. [CHAR_LIMIT=30] -->
<string name="action_resize">Resize</string>