diff options
| author | Yuli Huang <yuli@google.com> | 2012-05-17 11:32:15 +0800 |
|---|---|---|
| committer | Yuli Huang <yuli@google.com> | 2012-05-17 12:11:27 +0800 |
| commit | 5338d1959406e95a580858e418794e23e05c47e2 (patch) | |
| tree | 3ba61ee620be023af3706239276ea43cde3b29d0 /src | |
| parent | bcfa1b79930e567c6a52235445c759d37041ed0c (diff) | |
| download | android_packages_apps_Gallery2-5338d1959406e95a580858e418794e23e05c47e2.tar.gz android_packages_apps_Gallery2-5338d1959406e95a580858e418794e23e05c47e2.tar.bz2 android_packages_apps_Gallery2-5338d1959406e95a580858e418794e23e05c47e2.zip | |
Smooth opening animation by modifying interpolation curve.
bug:5367032
Change-Id: I15ad839ede723591f081be200c1c16a8a9a901d0
Diffstat (limited to 'src')
| -rw-r--r-- | src/com/android/gallery3d/ui/PositionController.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/ui/PositionController.java b/src/com/android/gallery3d/ui/PositionController.java index 1be601e1d..9797ce903 100644 --- a/src/com/android/gallery3d/ui/PositionController.java +++ b/src/com/android/gallery3d/ui/PositionController.java @@ -54,7 +54,7 @@ class PositionController { 600, // ANIM_KIND_SNAPBACK 400, // ANIM_KIND_SLIDE 300, // ANIM_KIND_ZOOM - 600, // ANIM_KIND_OPENING + 400, // ANIM_KIND_OPENING 0, // ANIM_KIND_FLING (the duration is calculated dynamically) 800, // ANIM_KIND_CAPTURE }; @@ -1212,10 +1212,12 @@ class PositionController { case ANIM_KIND_SCALE: progress = 1 - f * f; // quadratic break; + case ANIM_KIND_OPENING: + progress = 1 - f * f * f; // x^3 + break; case ANIM_KIND_SNAPBACK: case ANIM_KIND_ZOOM: case ANIM_KIND_SLIDE: - case ANIM_KIND_OPENING: progress = 1 - f * f * f * f * f; // x^5 break; } |
