summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Folder.java
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2016-02-03 16:30:15 -0800
committercretin45 <cretin45@gmail.com>2016-02-03 16:31:25 -0800
commit5f345281eb4f2752b99637203e63679d6bee504c (patch)
tree322f0141d72966c02c5c13511e9ec7a514f0581f /src/com/android/launcher3/Folder.java
parent15d36326dffc038551fcdc1632176402700e33a8 (diff)
downloadandroid_packages_apps_Trebuchet-5f345281eb4f2752b99637203e63679d6bee504c.tar.gz
android_packages_apps_Trebuchet-5f345281eb4f2752b99637203e63679d6bee504c.tar.bz2
android_packages_apps_Trebuchet-5f345281eb4f2752b99637203e63679d6bee504c.zip
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
Diffstat (limited to 'src/com/android/launcher3/Folder.java')
-rw-r--r--src/com/android/launcher3/Folder.java12
1 files changed, 10 insertions, 2 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);