Merge "Extend all apps pull up activation area to page indicator view b/29752599" into ub-launcher3-calgary

This commit is contained in:
Hyunyoung Song
2016-06-28 19:29:50 +00:00
committed by Android (Google) Code Review
3 changed files with 9 additions and 2 deletions
+1 -1
View File
@@ -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());