Merge "Extend all apps pull up activation area to page indicator view b/29752599" into ub-launcher3-calgary
This commit is contained in:
committed by
Android (Google) Code Review
commit
344ca1b827
@@ -321,7 +321,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
|
||||
return (getMeasuredHeight() - getViewportHeight()) / 2;
|
||||
}
|
||||
|
||||
PageIndicator getPageIndicator() {
|
||||
public PageIndicator getPageIndicator() {
|
||||
return mPageIndicator;
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +137,9 @@ public class AllAppsTransitionController implements TouchController, VerticalPul
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if (mLauncher.getDragLayer().isEventOverHotseat(ev) && !grid.isVerticalBarLayout()) {
|
||||
if ((mLauncher.getDragLayer().isEventOverHotseat(ev)
|
||||
|| mLauncher.getDragLayer().isEventOverPageIndicator(ev))
|
||||
&& !grid.isVerticalBarLayout()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,6 +187,11 @@ public class DragLayer extends InsettableFrameLayout {
|
||||
removeView(mOverlayView);
|
||||
}
|
||||
|
||||
public boolean isEventOverPageIndicator(MotionEvent ev) {
|
||||
getDescendantRectRelativeToSelf(mLauncher.getWorkspace().getPageIndicator(), mHitRect);
|
||||
return mHitRect.contains((int) ev.getX(), (int) ev.getY());
|
||||
}
|
||||
|
||||
public boolean isEventOverHotseat(MotionEvent ev) {
|
||||
getDescendantRectRelativeToSelf(mLauncher.getHotseat(), mHitRect);
|
||||
return mHitRect.contains((int) ev.getX(), (int) ev.getY());
|
||||
|
||||
Reference in New Issue
Block a user