diff options
author | Adam Cohen <adamcohen@google.com> | 2017-07-14 14:22:05 -0700 |
---|---|---|
committer | Adam Cohen <adamcohen@google.com> | 2017-07-14 22:09:56 +0000 |
commit | 5441a9d30a9e7cc4f245742d54b39d2e16d76bce (patch) | |
tree | 32696f66c61a6be3f9ef07149b7454795a2bd2bc /src/com/android/launcher3/Launcher.java | |
parent | 5dcd5027ca867f1556ea36d7cae6c4b78814e24d (diff) | |
download | android_packages_apps_Trebuchet-5441a9d30a9e7cc4f245742d54b39d2e16d76bce.tar.gz android_packages_apps_Trebuchet-5441a9d30a9e7cc4f245742d54b39d2e16d76bce.tar.bz2 android_packages_apps_Trebuchet-5441a9d30a9e7cc4f245742d54b39d2e16d76bce.zip |
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
Diffstat (limited to 'src/com/android/launcher3/Launcher.java')
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 6ae4068c8..6ab50f69f 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -2256,8 +2256,9 @@ public class Launcher extends BaseActivity 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 @@ public class Launcher extends BaseActivity } } + /** + * 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) { |