summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBobby Georgescu <georgescu@google.com>2012-10-22 18:03:02 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-10-22 18:03:02 -0700
commit3f8c855cc55329b27796d6df5f7861184cea4e1c (patch)
treef67e5dd0fee705b8c8fba5893415e4c1cc50a621
parent764541efbcae01955fe1826e7fd58c17ad53c40b (diff)
parenta1988ea0257872c07900a125a056427bb27258fe (diff)
downloadandroid_packages_apps_Snap-3f8c855cc55329b27796d6df5f7861184cea4e1c.tar.gz
android_packages_apps_Snap-3f8c855cc55329b27796d6df5f7861184cea4e1c.tar.bz2
android_packages_apps_Snap-3f8c855cc55329b27796d6df5f7861184cea4e1c.zip
am afa5ac4c: Merge "Minor transition tweaks" into gb-ub-photos-arches
* commit 'afa5ac4c6f81f0fe8faf072ba84bfa8fd9083a6c': Minor transition tweaks
-rw-r--r--src/com/android/gallery3d/anim/StateTransitionAnimation.java25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/com/android/gallery3d/anim/StateTransitionAnimation.java b/src/com/android/gallery3d/anim/StateTransitionAnimation.java
index 2f7a2ecdb..cf04d2cc8 100644
--- a/src/com/android/gallery3d/anim/StateTransitionAnimation.java
+++ b/src/com/android/gallery3d/anim/StateTransitionAnimation.java
@@ -16,6 +16,7 @@
package com.android.gallery3d.anim;
+import android.view.animation.AccelerateInterpolator;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.Interpolator;
@@ -31,7 +32,10 @@ public class StateTransitionAnimation extends Animation {
public static final Spec INCOMING;
public static final Spec PHOTO_INCOMING;
- public int duration = 250;
+ private static final Interpolator DEFAULT_INTERPOLATOR =
+ new DecelerateInterpolator();
+
+ public int duration = 330;
public float backgroundAlphaFrom = 0;
public float backgroundAlphaTo = 0;
public float backgroundScaleFrom = 0;
@@ -44,7 +48,7 @@ public class StateTransitionAnimation extends Animation {
public float overlayAlphaTo = 0;
public float overlayScaleFrom = 0;
public float overlayScaleTo = 0;
- public Interpolator interpolator;
+ public Interpolator interpolator = DEFAULT_INTERPOLATOR;
static {
OUTGOING = new Spec();
@@ -52,11 +56,10 @@ public class StateTransitionAnimation extends Animation {
OUTGOING.backgroundAlphaTo = 0f;
OUTGOING.backgroundScaleFrom = 1f;
OUTGOING.backgroundScaleTo = 0f;
- OUTGOING.contentAlphaFrom = 0.9f;
+ OUTGOING.contentAlphaFrom = 0.5f;
OUTGOING.contentAlphaTo = 1f;
OUTGOING.contentScaleFrom = 3f;
OUTGOING.contentScaleTo = 1f;
- OUTGOING.interpolator = new DecelerateInterpolator();
INCOMING = new Spec();
INCOMING.overlayAlphaFrom = 1f;
@@ -67,18 +70,8 @@ public class StateTransitionAnimation extends Animation {
INCOMING.contentAlphaTo = 1f;
INCOMING.contentScaleFrom = 0.25f;
INCOMING.contentScaleTo = 1f;
- INCOMING.interpolator = new DecelerateInterpolator();
-
- PHOTO_INCOMING = new Spec();
- PHOTO_INCOMING.overlayAlphaFrom = 1f;
- PHOTO_INCOMING.overlayAlphaTo = 0f;
- PHOTO_INCOMING.overlayScaleFrom = 1f;
- PHOTO_INCOMING.overlayScaleTo = 1f;
- PHOTO_INCOMING.contentAlphaFrom = 0f;
- PHOTO_INCOMING.contentAlphaTo = 1f;
- PHOTO_INCOMING.contentScaleFrom = 0.1f;
- PHOTO_INCOMING.contentScaleTo = 1f;
- PHOTO_INCOMING.interpolator = new DecelerateInterpolator();
+
+ PHOTO_INCOMING = INCOMING;
}
private static Spec specForTransition(Transition t) {