summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/launcher3/DeviceProfile.java4
-rw-r--r--src/com/android/launcher3/folder/Folder.java8
2 files changed, 9 insertions, 3 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 7a6a24431..a2796334e 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -462,9 +462,9 @@ public class DeviceProfile {
mInsets.top + availableHeightPx);
} else {
// Folders should only appear below the drop target bar and above the hotseat
- return new Rect(mInsets.left,
+ return new Rect(mInsets.left + edgeMarginPx,
mInsets.top + dropTargetBarSizePx + edgeMarginPx,
- mInsets.left + availableWidthPx,
+ mInsets.left + availableWidthPx - edgeMarginPx,
mInsets.top + availableHeightPx - hotseatBarSizePx
- pageIndicatorSizePx - edgeMarginPx);
}
diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java
index 64f96d517..8abafb0ea 100644
--- a/src/com/android/launcher3/folder/Folder.java
+++ b/src/com/android/launcher3/folder/Folder.java
@@ -18,6 +18,7 @@ package com.android.launcher3.folder;
import static com.android.launcher3.LauncherAnimUtils.SPRING_LOADED_EXIT_DELAY;
import static com.android.launcher3.LauncherState.NORMAL;
+import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.compat.AccessibilityManagerCompat.sendCustomAccessibilityEvent;
import android.animation.Animator;
@@ -929,7 +930,12 @@ public class Folder extends AbstractFloatingView implements DragSource, View.OnC
int centeredTop = centerY - height / 2;
// We need to bound the folder to the currently visible workspace area
- mLauncher.getWorkspace().getPageAreaRelativeToDragLayer(sTempRect);
+ if (mLauncher.isInState(OVERVIEW)) {
+ mLauncher.getDragLayer().getDescendantRectRelativeToSelf(mLauncher.getOverviewPanel(),
+ sTempRect);
+ } else {
+ mLauncher.getWorkspace().getPageAreaRelativeToDragLayer(sTempRect);
+ }
int left = Math.min(Math.max(sTempRect.left, centeredLeft),
sTempRect.right- width);
int top = Math.min(Math.max(sTempRect.top, centeredTop),