Fixing longpress bug on widgets with a ListView
Change-Id: Idca7a8948ca21f1e7a1c332fd56303f903eb122d
This commit is contained in:
@@ -744,6 +744,20 @@ public class Workspace extends ViewGroup
|
||||
return super.dispatchTouchEvent(ev);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public void requestDisallowInterceptTouchEvent(boolean disallowIntercept) {
|
||||
if (disallowIntercept) {
|
||||
// We need to make sure to cancel our long press if
|
||||
// a scrollable widget takes over touch events
|
||||
final View currentScreen = getChildAt(mCurrentScreen);
|
||||
currentScreen.cancelLongPress();
|
||||
}
|
||||
super.requestDisallowInterceptTouchEvent(disallowIntercept);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onInterceptTouchEvent(MotionEvent ev) {
|
||||
final boolean workspaceLocked = mLauncher.isWorkspaceLocked();
|
||||
|
||||
Reference in New Issue
Block a user