diff --git a/res/drawable-hdpi/page_hover_left.9.png b/res/drawable-hdpi/page_hover_left.9.png index 5f7087c885..cc029d8160 100644 Binary files a/res/drawable-hdpi/page_hover_left.9.png and b/res/drawable-hdpi/page_hover_left.9.png differ diff --git a/res/drawable-hdpi/page_hover_left_active.9.png b/res/drawable-hdpi/page_hover_left_active.9.png index 8787126d8a..20c91a0fd1 100644 Binary files a/res/drawable-hdpi/page_hover_left_active.9.png and b/res/drawable-hdpi/page_hover_left_active.9.png differ diff --git a/res/drawable-hdpi/page_hover_right.9.png b/res/drawable-hdpi/page_hover_right.9.png index ef991b7024..a42822ad8d 100644 Binary files a/res/drawable-hdpi/page_hover_right.9.png and b/res/drawable-hdpi/page_hover_right.9.png differ diff --git a/res/drawable-hdpi/page_hover_right_active.9.png b/res/drawable-hdpi/page_hover_right_active.9.png index cd5b42db2c..523fafd6d1 100644 Binary files a/res/drawable-hdpi/page_hover_right_active.9.png and b/res/drawable-hdpi/page_hover_right_active.9.png differ diff --git a/res/drawable-mdpi/page_hover_left.9.png b/res/drawable-mdpi/page_hover_left.9.png index 0d537e6cbb..2bbf428072 100644 Binary files a/res/drawable-mdpi/page_hover_left.9.png and b/res/drawable-mdpi/page_hover_left.9.png differ diff --git a/res/drawable-mdpi/page_hover_left_active.9.png b/res/drawable-mdpi/page_hover_left_active.9.png index 3004f9e510..bf70f36011 100644 Binary files a/res/drawable-mdpi/page_hover_left_active.9.png and b/res/drawable-mdpi/page_hover_left_active.9.png differ diff --git a/res/drawable-mdpi/page_hover_right.9.png b/res/drawable-mdpi/page_hover_right.9.png index c0fbb7da64..4bafd0f713 100644 Binary files a/res/drawable-mdpi/page_hover_right.9.png and b/res/drawable-mdpi/page_hover_right.9.png differ diff --git a/res/drawable-mdpi/page_hover_right_active.9.png b/res/drawable-mdpi/page_hover_right_active.9.png index 6d39687e4f..4aaa0148e7 100644 Binary files a/res/drawable-mdpi/page_hover_right_active.9.png and b/res/drawable-mdpi/page_hover_right_active.9.png differ diff --git a/res/drawable-xhdpi/page_hover_left.9.png b/res/drawable-xhdpi/page_hover_left.9.png index 9b0def8bb6..a2b9b65d7f 100644 Binary files a/res/drawable-xhdpi/page_hover_left.9.png and b/res/drawable-xhdpi/page_hover_left.9.png differ diff --git a/res/drawable-xhdpi/page_hover_left_active.9.png b/res/drawable-xhdpi/page_hover_left_active.9.png index 6440bdf719..ba9478ece5 100644 Binary files a/res/drawable-xhdpi/page_hover_left_active.9.png and b/res/drawable-xhdpi/page_hover_left_active.9.png differ diff --git a/res/drawable-xhdpi/page_hover_right.9.png b/res/drawable-xhdpi/page_hover_right.9.png index c7bdfe9291..1243ea9ec9 100644 Binary files a/res/drawable-xhdpi/page_hover_right.9.png and b/res/drawable-xhdpi/page_hover_right.9.png differ diff --git a/res/drawable-xhdpi/page_hover_right_active.9.png b/res/drawable-xhdpi/page_hover_right_active.9.png index 43660e50f0..582261c9be 100644 Binary files a/res/drawable-xhdpi/page_hover_right_active.9.png and b/res/drawable-xhdpi/page_hover_right_active.9.png differ diff --git a/res/drawable-xxhdpi/page_hover_left.9.png b/res/drawable-xxhdpi/page_hover_left.9.png index 0c0eddda17..63869dd3e6 100644 Binary files a/res/drawable-xxhdpi/page_hover_left.9.png and b/res/drawable-xxhdpi/page_hover_left.9.png differ diff --git a/res/drawable-xxhdpi/page_hover_left_active.9.png b/res/drawable-xxhdpi/page_hover_left_active.9.png index a9ae222222..9a418ce1e3 100644 Binary files a/res/drawable-xxhdpi/page_hover_left_active.9.png and b/res/drawable-xxhdpi/page_hover_left_active.9.png differ diff --git a/res/drawable-xxhdpi/page_hover_right.9.png b/res/drawable-xxhdpi/page_hover_right.9.png index d61f94f950..c6fd398859 100644 Binary files a/res/drawable-xxhdpi/page_hover_right.9.png and b/res/drawable-xxhdpi/page_hover_right.9.png differ diff --git a/res/drawable-xxhdpi/page_hover_right_active.9.png b/res/drawable-xxhdpi/page_hover_right_active.9.png index 079ee1ef17..7aef3733c3 100644 Binary files a/res/drawable-xxhdpi/page_hover_right_active.9.png and b/res/drawable-xxhdpi/page_hover_right_active.9.png differ diff --git a/src/com/android/launcher3/DragLayer.java b/src/com/android/launcher3/DragLayer.java index 72d33dae86..79cb1f9c4f 100644 --- a/src/com/android/launcher3/DragLayer.java +++ b/src/com/android/launcher3/DragLayer.java @@ -81,6 +81,14 @@ public class DragLayer extends FrameLayout implements ViewGroup.OnHierarchyChang private Drawable mBackground; private float mBackgroundAlpha = 0; + // Related to adjacent page hints + private boolean mInScrollArea; + private boolean mShowPageHints; + private Drawable mLeftHoverDrawable; + private Drawable mRightHoverDrawable; + private Drawable mLeftHoverDrawableActive; + private Drawable mRightHoverDrawableActive; + /** * Used to create a new DragLayer from XML. * @@ -851,13 +859,6 @@ public class DragLayer extends FrameLayout implements ViewGroup.OnHierarchyChang } } - private boolean mInScrollArea; - private boolean mShowPageHints; - private Drawable mLeftHoverDrawable; - private Drawable mRightHoverDrawable; - private Drawable mLeftHoverDrawableActive; - private Drawable mRightHoverDrawableActive; - void onEnterScrollArea(int direction) { mInScrollArea = true; invalidate(); @@ -896,8 +897,9 @@ public class DragLayer extends FrameLayout implements ViewGroup.OnHierarchyChang } super.dispatchDraw(canvas); + } - // Draw screen hover indicators above children. + private void drawPageHints(Canvas canvas) { if (mShowPageHints) { Workspace workspace = mLauncher.getWorkspace(); int width = getMeasuredWidth(); @@ -920,7 +922,6 @@ public class DragLayer extends FrameLayout implements ViewGroup.OnHierarchyChang if (rightPage != null && rightPage.isDragTarget()) { Drawable right = mInScrollArea && rightPage.getIsDragOverlapping() ? mRightHoverDrawableActive : mRightHoverDrawable; - right.setBounds(width - right.getIntrinsicWidth(), childRect.top, width, childRect.bottom); right.draw(canvas); @@ -928,6 +929,16 @@ public class DragLayer extends FrameLayout implements ViewGroup.OnHierarchyChang } } + protected boolean drawChild(Canvas canvas, View child, long drawingTime) { + boolean ret = super.drawChild(canvas, child, drawingTime); + + // We want to draw the page hints above the workspace, but below the drag view. + if (child instanceof Workspace) { + drawPageHints(canvas); + } + return ret; + } + public void setBackgroundAlpha(float alpha) { if (alpha != mBackgroundAlpha) { mBackgroundAlpha = alpha;