From 5f345281eb4f2752b99637203e63679d6bee504c Mon Sep 17 00:00:00 2001 From: cretin45 Date: Wed, 3 Feb 2016 16:30:15 -0800 Subject: Trebuchet: Don't animate folder closed when pressing menu key * Also don't animate with Y translation if animation boolean is false. Issue-id: OPO-434 Change-Id: I4d2e68d967eca87c3e3d27e4ea22d4126ef3c998 --- src/com/android/launcher3/Folder.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/com/android/launcher3/Folder.java') 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); -- cgit v1.2.3