Showing page indicator while dragging (Bug: 5117192)

Change-Id: I3c8180b2166f3961fbb9529c5de187b4b7b561cf
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java
index 903169f..afee8b0 100644
--- a/src/com/android/launcher2/PagedView.java
+++ b/src/com/android/launcher2/PagedView.java
@@ -341,12 +341,10 @@
 
     // a method that subclasses can override to add behavior
     protected void onPageBeginMoving() {
-        showScrollingIndicator(false);
     }
 
     // a method that subclasses can override to add behavior
     protected void onPageEndMoving() {
-        hideScrollingIndicator(false);
     }
 
     /**
diff --git a/src/com/android/launcher2/PagedViewWithDraggableItems.java b/src/com/android/launcher2/PagedViewWithDraggableItems.java
index 287a065..a047970 100644
--- a/src/com/android/launcher2/PagedViewWithDraggableItems.java
+++ b/src/com/android/launcher2/PagedViewWithDraggableItems.java
@@ -165,4 +165,12 @@
         cancelDragging();
         super.onDetachedFromWindow();
     }
+
+    /** Show the scrolling indicators when we move the page */
+    protected void onPageBeginMoving() {
+        showScrollingIndicator(false);
+    }
+    protected void onPageEndMoving() {
+        hideScrollingIndicator(false);
+    }
 }
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 4ecc1a5..c476fd6 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -678,6 +678,9 @@
         if (LauncherApplication.isScreenLarge()) {
             showOutlines();
         }
+
+        // Show the scroll indicator as you pan the page
+        showScrollingIndicator(false);
     }
 
     protected void onPageEndMoving() {
@@ -701,6 +704,11 @@
             if (LauncherApplication.isScreenLarge()) {
                 hideOutlines();
             }
+
+            // Hide the scroll indicator as you pan the page
+            if (!mDragController.isDragging()) {
+                hideScrollingIndicator(false);
+            }
         }
         mOverScrollMaxBackgroundAlpha = 0.0f;
         mOverScrollPageIndex = -1;
@@ -1928,6 +1936,9 @@
         mDragController.startDrag(b, dragLayerX, dragLayerY, source, child.getTag(),
                 DragController.DRAG_ACTION_MOVE, dragVisualizeOffset, dragRect);
         b.recycle();
+
+        // Show the scrolling indicator when you pick up an item
+        showScrollingIndicator(false);
     }
 
     void addApplicationShortcut(ShortcutInfo info, CellLayout target, long container, int screen,
@@ -3118,6 +3129,9 @@
         }
         mDragOutline = null;
         mDragInfo = null;
+
+        // Hide the scrolling indicator after you pick up an item
+        hideScrollingIndicator(false);
     }
 
     public boolean isDropEnabled() {