Implement spring-loading of folders when dragging over.

Bug: 8912132
Change-Id: Id81889a133e56461df2e20599c4b40020818ba18
This commit is contained in:
Jorim Jaggi
2014-01-16 15:30:42 -08:00
parent f180497bc3
commit 55bd9725d5
5 changed files with 148 additions and 62 deletions

View File

@@ -817,7 +817,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
*/
private void endDragging(View target, boolean isFlingToDelete, boolean success) {
if (isFlingToDelete || !success || (target != mLauncher.getWorkspace() &&
!(target instanceof DeleteDropTarget))) {
!(target instanceof DeleteDropTarget) && !(target instanceof Folder))) {
// Exit spring loaded mode if we have not successfully dropped or have not handled the
// drop in Workspace
mLauncher.getWorkspace().removeExtraEmptyScreen(true, new Runnable() {