summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Workspace.java
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2014-05-16 16:42:35 -0700
committerAdam Cohen <adamcohen@google.com>2014-05-16 18:18:20 -0700
commit6268f2db4c129e33d8d77513cb9df0f4799c7520 (patch)
tree9001025468b615f946e9c5f45e27bc9ead8ea003 /src/com/android/launcher3/Workspace.java
parentbbe1e24c5ff470a695510d23d67bcb6f2ad88d0e (diff)
downloadandroid_packages_apps_Trebuchet-6268f2db4c129e33d8d77513cb9df0f4799c7520.tar.gz
android_packages_apps_Trebuchet-6268f2db4c129e33d8d77513cb9df0f4799c7520.tar.bz2
android_packages_apps_Trebuchet-6268f2db4c129e33d8d77513cb9df0f4799c7520.zip
Disable the folder cling in two cases
-> When the user creates a new folder -> When the user drags an existing folder -> The folder cling gets cut off in certain instances and until we make it more extensible (not worth it right now), we're disabling it in the problematic cases. Also, in the problematic cases, the user is demonstrating some advanced knowledge, so it's somewhat justifiable. issue 14491765 Change-Id: Ib15d2f097c51a9b755f04b95ed6ef468d3bacc60
Diffstat (limited to 'src/com/android/launcher3/Workspace.java')
-rw-r--r--src/com/android/launcher3/Workspace.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 0669f3a2d..d734abdcd 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -2719,8 +2719,9 @@ public class Workspace extends SmoothPagedView
BubbleTextView icon = (BubbleTextView) child;
icon.clearPressedOrFocusedBackground();
} else if (child instanceof FolderIcon) {
- // Dismiss the folder cling if we haven't already
- mLauncher.getLauncherClings().markFolderClingDismissed();
+ // The folder cling isn't flexible enough to be shown in non-default workspace positions
+ // Also if they are dragging it a folder, we assume they don't need to see the cling.
+ mLauncher.markFolderClingDismissedIfNecessary();
}
if (child.getTag() == null || !(child.getTag() instanceof ItemInfo)) {
@@ -3066,6 +3067,10 @@ public class Workspace extends SmoothPagedView
// cell also contains a shortcut, then create a folder with the two shortcuts.
if (!mInScrollArea && createUserFolderIfNecessary(cell, container,
dropTargetLayout, mTargetCell, distance, false, d.dragView, null)) {
+ // The folder cling isn't flexible enough to be shown in non-default workspace
+ // positions. Also if they are creating a folder, we assume they don't need to
+ // see the cling.
+ mLauncher.markFolderClingDismissedIfNecessary();
return;
}
@@ -3965,6 +3970,10 @@ public class Workspace extends SmoothPagedView
d.postAnimationRunnable = exitSpringLoadedRunnable;
if (createUserFolderIfNecessary(view, container, cellLayout, mTargetCell, distance,
true, d.dragView, d.postAnimationRunnable)) {
+ // The folder cling isn't flexible enough to be shown in non-default workspace
+ // positions. Also if they are creating a folder, we assume they don't need to
+ // see the cling.
+ mLauncher.markFolderClingDismissedIfNecessary();
return;
}
if (addToExistingFolderIfNecessary(view, cellLayout, mTargetCell, distance, d,