summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/widget/WidgetsContainerView.java
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2015-09-09 13:50:40 -0700
committerTony Wickham <twickham@google.com>2015-09-09 17:08:50 -0700
commit869306140d3bb8782040ed65d3ae0ba498c2de6c (patch)
tree1bf6de517ed0623e60b77f84344a00e4410f6053 /src/com/android/launcher3/widget/WidgetsContainerView.java
parent57a0e98a7d82b16b4f80798f530ce3cec53c79c2 (diff)
downloadandroid_packages_apps_Trebuchet-869306140d3bb8782040ed65d3ae0ba498c2de6c.tar.gz
android_packages_apps_Trebuchet-869306140d3bb8782040ed65d3ae0ba498c2de6c.tar.bz2
android_packages_apps_Trebuchet-869306140d3bb8782040ed65d3ae0ba498c2de6c.zip
When placing a widget, go to a page with enough space.
The search for this page starts at the current one and continues to the right (on LTR) until a page is found that can accomodate the widget, taking possible resizing and reordering into account. Bug: 11338870 Change-Id: I2e9a310eb8f74024dca9150f55a525e1309c2f07
Diffstat (limited to 'src/com/android/launcher3/widget/WidgetsContainerView.java')
-rw-r--r--src/com/android/launcher3/widget/WidgetsContainerView.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/launcher3/widget/WidgetsContainerView.java b/src/com/android/launcher3/widget/WidgetsContainerView.java
index e6059d5c7..81a8465d8 100644
--- a/src/com/android/launcher3/widget/WidgetsContainerView.java
+++ b/src/com/android/launcher3/widget/WidgetsContainerView.java
@@ -253,9 +253,11 @@ public class WidgetsContainerView extends BaseContainerView
// Start the drag
mLauncher.lockScreenOrientation();
- mLauncher.getWorkspace().onDragStartedWithItem(createItemInfo, preview, clipAlpha);
mDragController.startDrag(image, preview, this, createItemInfo,
bounds, DragController.DRAG_ACTION_COPY, scale);
+ // This call expects the extra empty screen to already be created, which is why we call it
+ // after mDragController.startDrag().
+ mLauncher.getWorkspace().onDragStartedWithItem(createItemInfo, preview, clipAlpha);
preview.recycle();
return true;