diff options
Diffstat (limited to 'src/com/android/launcher3')
-rw-r--r-- | src/com/android/launcher3/Folder.java | 12 | ||||
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 8 |
2 files changed, 16 insertions, 4 deletions
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java index 4763172c9..2e73c5749 100644 --- a/src/com/android/launcher3/Folder.java +++ b/src/com/android/launcher3/Folder.java @@ -791,10 +791,18 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList if (mPowerManager.isPowerSaveMode() || animatorDurationScale < 0.01f) { // power save mode is no fun - skip alpha animation and just set it to 0 // otherwise the icons will stay around until the duration of the animation - oa = LauncherAnimUtils.ofPropertyValuesHolder(this, translationY); + if (animate) { + oa = LauncherAnimUtils.ofPropertyValuesHolder(this, translationY); + } else { + oa = LauncherAnimUtils.ofPropertyValuesHolder(this); + } setAlpha(0f); } else { - oa = LauncherAnimUtils.ofPropertyValuesHolder(this, alpha, translationY); + if (animate) { + oa = LauncherAnimUtils.ofPropertyValuesHolder(this, alpha, translationY); + } else { + oa = LauncherAnimUtils.ofPropertyValuesHolder(this, alpha); + } } oa.setDuration(mMaterialExpandDuration); diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 39a7041e0..bc7cb6290 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -2528,7 +2528,7 @@ public class Launcher extends Activity super.onPrepareOptionsMenu(menu); if (!isOnCustomContent()) { // Close any open folders - closeFolder(); + closeFolder(false); // Stop resizing any widgets mWorkspace.exitWidgetResizeMode(); if (!mWorkspace.isInOverviewMode()) { @@ -3567,12 +3567,16 @@ public class Launcher extends Activity } public void closeFolder() { + closeFolder(true); + } + + public void closeFolder(boolean animate) { Folder folder = mWorkspace != null ? mWorkspace.getOpenFolder() : null; if (folder != null) { if (folder.isEditingName()) { folder.dismissEditingName(); } - closeFolder(folder); + closeFolder(folder, animate); } } |