diff options
author | Kamaljeet Maini <kmaini@cyngn.com> | 2016-03-17 17:25:48 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-03-25 10:35:14 -0700 |
commit | c8e0058a59463c334282df592207e38183ae4243 (patch) | |
tree | e613bc1f586b6cfd024f88518af30a069a6afbf1 /src/com/android/launcher3 | |
parent | e812052ff07a96e5008fdfea671357c74baf21e3 (diff) | |
download | android_packages_apps_Trebuchet-c8e0058a59463c334282df592207e38183ae4243.tar.gz android_packages_apps_Trebuchet-c8e0058a59463c334282df592207e38183ae4243.tar.bz2 android_packages_apps_Trebuchet-c8e0058a59463c334282df592207e38183ae4243.zip |
Ignore tap below scrubber in the app container padding area
When user taps on the padding area of all apps container below
the scrubber, the tap should be ignored. Before this patch, the
tap was sent back to parent view, which led to scrolling of the
background wallpaper. Now the tap is ignored.
Change-Id: Ic8840c9eafaf254d2bfbffe556f3dc7ab20fdccc
Issue-Id: CyanogenOS/CYNGNOS-1933
Diffstat (limited to 'src/com/android/launcher3')
-rw-r--r-- | src/com/android/launcher3/allapps/AllAppsContainerView.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java index 8e4491180..989148f89 100644 --- a/src/com/android/launcher3/allapps/AllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java @@ -485,7 +485,23 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc @SuppressLint("ClickableViewAccessibility") @Override public boolean onTouchEvent(MotionEvent ev) { - return handleTouchEvent(ev); + int y = (int) ev.getY(); + int[] location = new int[2]; + int height = 0; + + // Ignore the touch if it is below scrubber (if enabled) or below app recycler view + if (useScroller() && useScrubber()) { + mScrubber.getLocationInWindow(location); + height = mScrubber.getHeight(); + } else { + mAppsRecyclerView.getLocationInWindow(location); + height = mAppsRecyclerView.getHeight(); + } + if (y >= location[1] + height) { + return true; + } else { + return handleTouchEvent(ev); + } } @SuppressLint("ClickableViewAccessibility") |