Make landscape all apps caret clickable when in all apps as well as workspace
-> Also increase the touch target size of the caret
-> Center the asset horizontally within the view (but keep it bottom
asligned)
issue 63681599
issue 63682248
Change-Id: I64efdfb9f84b82cc21d82c10d9301a99fed3353a
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 6ae4068..6ab50f6 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -2256,8 +2256,9 @@
if (v instanceof FolderIcon) {
onClickFolderIcon(v);
}
- } else if ((FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && v instanceof PageIndicator) ||
- (v == mAllAppsButton && mAllAppsButton != null)) {
+ } else if ((FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && v instanceof PageIndicator)) {
+ onClickAllAppsCaret(v);
+ } else if (v == mAllAppsButton && mAllAppsButton != null) {
onClickAllAppsButton(v);
} else if (tag instanceof AppInfo) {
startAppShortcutOrInfoActivity(v);
@@ -2322,6 +2323,22 @@
}
}
+ /**
+ * Event handler for the swipe up caret
+ *
+ * @param v The view that was clicked.
+ */
+ protected void onClickAllAppsCaret(View v) {
+ if (LOGD) Log.d(TAG, "onClickAllAppsCaret");
+ if (!isAppsViewVisible()) {
+ getUserEventDispatcher().logActionOnControl(Action.Touch.TAP,
+ ControlType.ALL_APPS_BUTTON);
+ showAppsView(true /* animated */, true /* updatePredictedApps */);
+ } else {
+ showWorkspace(true);
+ }
+ }
+
private void onClickPendingAppItem(final View v, final String packageName,
boolean downloadStarted) {
if (downloadStarted) {