diff options
author | Tony Wickham <twickham@google.com> | 2018-01-16 19:03:40 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2018-01-16 19:03:40 +0000 |
commit | cf9f8d71f5576f80ab38a371cdae0211a9e9780b (patch) | |
tree | afb10414478b18c9501b3b632e4be5d086034532 /src/com | |
parent | 8d55f9858c2e19a1cebd5ebc79fac0000f2be166 (diff) | |
parent | b4b7e20ebc446a4a5c202de6e222e06d27dafb42 (diff) | |
download | android_packages_apps_Trebuchet-cf9f8d71f5576f80ab38a371cdae0211a9e9780b.tar.gz android_packages_apps_Trebuchet-cf9f8d71f5576f80ab38a371cdae0211a9e9780b.tar.bz2 android_packages_apps_Trebuchet-cf9f8d71f5576f80ab38a371cdae0211a9e9780b.zip |
Merge "Bound folders to overview panel instead of workspace" into ub-launcher3-master
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/launcher3/DeviceProfile.java | 4 | ||||
-rw-r--r-- | src/com/android/launcher3/folder/Folder.java | 8 |
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), |