diff options
author | Winson Chung <winsonc@google.com> | 2011-06-06 14:27:16 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2011-06-13 11:49:32 -0700 |
commit | f0ea4d3378be7b962c8e0bce2392df5e82491fb8 (patch) | |
tree | 72300454a7751c7d1b239c5264a73233736fc8a0 /src/com/android/launcher2/PagedViewGridLayout.java | |
parent | bf5a5c894d8af7f3b3001ebbc596fd83a0a73c7e (diff) | |
download | android_packages_apps_Trebuchet-f0ea4d3378be7b962c8e0bce2392df5e82491fb8.tar.gz android_packages_apps_Trebuchet-f0ea4d3378be7b962c8e0bce2392df5e82491fb8.tar.bz2 android_packages_apps_Trebuchet-f0ea4d3378be7b962c8e0bce2392df5e82491fb8.zip |
Replacing AllApps/Customize in tablet UI with Apps/Customize.
Change-Id: I11a296b25472e4bf298a468865b0dff29f500aaa
Diffstat (limited to 'src/com/android/launcher2/PagedViewGridLayout.java')
-rw-r--r-- | src/com/android/launcher2/PagedViewGridLayout.java | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/com/android/launcher2/PagedViewGridLayout.java b/src/com/android/launcher2/PagedViewGridLayout.java index cedf71c5b..c6d39fd5f 100644 --- a/src/com/android/launcher2/PagedViewGridLayout.java +++ b/src/com/android/launcher2/PagedViewGridLayout.java @@ -59,14 +59,15 @@ public class PagedViewGridLayout extends FrameLayout implements Page { @Override public boolean onTouchEvent(MotionEvent event) { - // We eat up the touch events here, since the PagedView (which uses the same swiping - // touch code as Workspace previously) uses onInterceptTouchEvent() to determine when - // the user is scrolling between pages. This means that if the pages themselves don't - // handle touch events, it gets forwarded up to PagedView itself, and it's own - // onTouchEvent() handling will prevent further intercept touch events from being called - // (it's the same view in that case). This is not ideal, but to prevent more changes, - // we just always mark the touch event as handled. - return super.onTouchEvent(event) || true; + boolean result = super.onTouchEvent(event); + int count = getPageChildCount(); + if (count > 0) { + // We only intercept the touch if we are tapping in empty space after the final row + View child = getChildOnPageAt(count - 1); + int bottom = child.getBottom(); + result = result || (event.getY() < bottom); + } + return result; } @Override |