Fixing issues with spring loaded adding.

- Delaying until items are added
- Showing bg when going into spring loaded mode
- Fixing regression where dropping widgets on full page would not trigger a notification
- Fixing regression on tablet where pages were no longer being rotated or shown

Change-Id: Iadc0c406f0c065c5029addea1abfee395eed81b9
This commit is contained in:
Winson Chung
2011-07-08 15:34:52 -07:00
parent a71cb1778d
commit 557d6ed50c
27 changed files with 302 additions and 213 deletions
@@ -472,9 +472,13 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
}
return true;
}
private void endDragging(boolean success) {
private void endDragging(View target, boolean success) {
mLauncher.getWorkspace().onDragStopped(success);
mLauncher.exitSpringLoadedDragMode();
if (!success || target != mLauncher.getWorkspace()) {
// Exit spring loaded mode if we have not successfully dropped or have not handled the
// drop in Workspace
mLauncher.exitSpringLoadedDragMode();
}
mLauncher.unlockScreenOrientation();
}
@@ -486,7 +490,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
public void onDragViewVisible() {}
@Override
public void onDropCompleted(View target, DragObject d, boolean success) {
endDragging(success);
endDragging(target, success);
// Display an error message if the drag failed due to there not being enough space on the
// target layout we were dropping on.