return;
}
- if (v instanceof PageIndicator) {
- if (!mWorkspace.isInOverviewMode()) {
- mWorkspace.enterOverviewMode();
+ if (v instanceof Workspace) {
+ if (mWorkspace.isInOverviewMode()) {
+ mWorkspace.exitOverviewMode(true);
}
return;
}
if (isWorkspaceLocked()) return false;
if (mState != State.WORKSPACE) return false;
+ if (v instanceof Workspace) {
+ if (!mWorkspace.isInOverviewMode()) {
+ mWorkspace.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS,
+ HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING);
+ mWorkspace.enterOverviewMode();
+ }
+ return true;
+ }
+
if (!(v instanceof CellLayout)) {
v = (View) v.getParent().getParent();
}
}
mPageIndicator.addMarkers(markers, mAllowPagedViewAnimations);
- mPageIndicator.setOnClickListener((Launcher) getContext());
}
}
for (int i = 0; i < count; i++) {
getPageAt(i).setOnLongClickListener(l);
}
+ super.setOnLongClickListener(l);
}
@Override
return false;
}
+ super.onTouchEvent(ev);
+
// Skip touch handling if there are no pages to swipe
if (getChildCount() <= 0) return super.onTouchEvent(ev);
mActivePointerId = INVALID_POINTER;
}
- protected void onUnhandledTap(MotionEvent ev) {}
+ protected void onUnhandledTap(MotionEvent ev) {
+ ((Launcher) getContext()).onClick(this);
+ }
@Override
public boolean onGenericMotionEvent(MotionEvent event) {