Merge "Showing page indicator while dragging (Bug: 5117192)"

This commit is contained in:
Winson Chung
2012-01-24 13:25:34 -08:00
committed by Android (Google) Code Review
3 changed files with 22 additions and 2 deletions
-2
View File
@@ -341,12 +341,10 @@ public abstract class PagedView extends ViewGroup {
// 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);
}
/**
@@ -165,4 +165,12 @@ public abstract class PagedViewWithDraggableItems extends PagedView
cancelDragging();
super.onDetachedFromWindow();
}
/** Show the scrolling indicators when we move the page */
protected void onPageBeginMoving() {
showScrollingIndicator(false);
}
protected void onPageEndMoving() {
hideScrollingIndicator(false);
}
}
+14
View File
@@ -678,6 +678,9 @@ public class Workspace extends SmoothPagedView
if (LauncherApplication.isScreenLarge()) {
showOutlines();
}
// Show the scroll indicator as you pan the page
showScrollingIndicator(false);
}
protected void onPageEndMoving() {
@@ -701,6 +704,11 @@ public class Workspace extends SmoothPagedView
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 @@ public class Workspace extends SmoothPagedView
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 @@ public class Workspace extends SmoothPagedView
}
mDragOutline = null;
mDragInfo = null;
// Hide the scrolling indicator after you pick up an item
hideScrollingIndicator(false);
}
public boolean isDropEnabled() {