Mouse wheel scroll apps with work profile enabled instead of switching tabs
Test: Manual Bug:79164903 Change-Id: I4b382034ea5b91b24dcc158bd9fa46d64f54cc7a
This commit is contained in:
parent
6fe3eec95c
commit
59cba191c3
|
@ -1299,6 +1299,9 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
|||
vscroll = -event.getAxisValue(MotionEvent.AXIS_VSCROLL);
|
||||
hscroll = event.getAxisValue(MotionEvent.AXIS_HSCROLL);
|
||||
}
|
||||
if (Math.abs(vscroll) > Math.abs(hscroll) && !isVerticalScrollable()) {
|
||||
return true;
|
||||
}
|
||||
if (hscroll != 0 || vscroll != 0) {
|
||||
boolean isForwardScroll = mIsRtl ? (hscroll < 0 || vscroll < 0)
|
||||
: (hscroll > 0 || vscroll > 0);
|
||||
|
@ -1315,6 +1318,10 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
|||
return super.onGenericMotionEvent(event);
|
||||
}
|
||||
|
||||
protected boolean isVerticalScrollable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
private void acquireVelocityTrackerAndAddMovement(MotionEvent ev) {
|
||||
if (mVelocityTracker == null) {
|
||||
mVelocityTracker = VelocityTracker.obtain();
|
||||
|
|
|
@ -81,4 +81,9 @@ public class AllAppsPagedView extends PagedView<PersonalWorkSlidingTabStrip> {
|
|||
public boolean hasOverlappingRendering() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isVerticalScrollable() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue