Replacing AllApps/Customize in tablet UI with Apps/Customize.

Change-Id: I11a296b25472e4bf298a468865b0dff29f500aaa
This commit is contained in:
Winson Chung
2011-06-06 14:27:16 -07:00
parent bf5a5c894d
commit f0ea4d3378
36 changed files with 722 additions and 1003 deletions

View File

@@ -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