mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Merge "Ignore generic motion events if custom content doesn't allow scrolling" into ub-now-porkchop
This commit is contained in:
committed by
Android (Google) Code Review
commit
2111606845
@@ -1115,6 +1115,17 @@ public class Workspace extends SmoothPagedView
|
||||
return super.onInterceptTouchEvent(ev);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onGenericMotionEvent(MotionEvent event) {
|
||||
// Ignore pointer scroll events if the custom content doesn't allow scrolling.
|
||||
if ((getScreenIdForPageIndex(getCurrentPage()) == CUSTOM_CONTENT_SCREEN_ID)
|
||||
&& (mCustomContentCallbacks != null)
|
||||
&& !mCustomContentCallbacks.isScrollingAllowed()) {
|
||||
return false;
|
||||
}
|
||||
return super.onGenericMotionEvent(event);
|
||||
}
|
||||
|
||||
protected void reinflateWidgetsIfNecessary() {
|
||||
final int clCount = getChildCount();
|
||||
for (int i = 0; i < clCount; i++) {
|
||||
|
||||
Reference in New Issue
Block a user