summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2011-10-17 21:48:02 -0700
committerAdam Cohen <adamcohen@google.com>2011-10-17 21:53:41 -0700
commitb64d36e6f8006b3ea5a6c2951af4cf8dea72d08e (patch)
treee0b15cc1f0d2ccbd85faed3764f9da869c45bed1
parent7fe4f8ba0a3c065773f3166940f6b34e42194389 (diff)
downloadandroid_packages_apps_Trebuchet-b64d36e6f8006b3ea5a6c2951af4cf8dea72d08e.tar.gz
android_packages_apps_Trebuchet-b64d36e6f8006b3ea5a6c2951af4cf8dea72d08e.tar.bz2
android_packages_apps_Trebuchet-b64d36e6f8006b3ea5a6c2951af4cf8dea72d08e.zip
Fixing stutter in AllApps transition
-> Tightened up the interpolator and decreased the duration of the AllApps-in animation. This removes many excess frames at the end of the transition, and frees up perf for swiping AllApps: (issue 5359751) -> Changed when AllApps state gets reset -- now only after leaving home, and then pressing home, or when the screen turns off. Change-Id: I76e988102da91c12cb52af01468cf9a81fe45545
-rw-r--r--res/values/config.xml4
-rw-r--r--src/com/android/launcher2/AppsCustomizePagedView.java10
-rw-r--r--src/com/android/launcher2/Launcher.java3
-rw-r--r--src/com/android/launcher2/Workspace.java4
4 files changed, 13 insertions, 8 deletions
diff --git a/res/values/config.xml b/res/values/config.xml
index ff8dede18..b8040e68f 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -23,8 +23,8 @@
<!-- Fade/zoom in/out duration & scale in the AllApps transition.
Note: This should be less than the workspaceShrinkTime as they happen together. -->
- <integer name="config_appsCustomizeZoomInTime">700</integer>
- <integer name="config_appsCustomizeZoomOutTime">700</integer>
+ <integer name="config_appsCustomizeZoomInTime">350</integer>
+ <integer name="config_appsCustomizeZoomOutTime">600</integer>
<integer name="config_appsCustomizeZoomScaleFactor">7</integer>
<integer name="config_appsCustomizeFadeInTime">250</integer>
<integer name="config_appsCustomizeFadeOutTime">200</integer>
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index 4f5d83599..7bc4b511b 100644
--- a/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -1360,8 +1360,14 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
@Override
public void reset() {
- updateCurrentTab(0);
- invalidatePageData(0);
+ AppsCustomizeTabHost tabHost = getTabHost();
+ String tag = tabHost.getCurrentTabTag();
+ if (!tag.equals(tabHost.getTabTagForContentType(ContentType.Applications))) {
+ tabHost.setCurrentTabFromContent(ContentType.Applications);
+ }
+ if (mCurrentPage != 0) {
+ invalidatePageData(0);
+ }
}
private AppsCustomizeTabHost getTabHost() {
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index dc7b77e86..02f19ac09 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -1209,7 +1209,7 @@ public final class Launcher extends Activity
}
// Reset AllApps to its initial state
- if (mAppsCustomizeTabHost != null) {
+ if (!alreadyOnHome && mAppsCustomizeTabHost != null) {
mAppsCustomizeTabHost.reset();
}
}
@@ -2187,7 +2187,6 @@ public final class Launcher extends Activity
// Shrink workspaces away if going to AppsCustomize from workspace
mWorkspace.changeState(Workspace.State.SMALL, animated);
- //hideHotseat(animated);
if (animated) {
final ValueAnimator scaleAnim = ValueAnimator.ofFloat(0f, 1f).setDuration(duration);
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 8a492a28e..d1f9617ac 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -1421,8 +1421,8 @@ public class Workspace extends SmoothPagedView
* ZInterpolator compounded with an ease-out.
*/
static class ZoomOutInterpolator implements TimeInterpolator {
- private final ZInterpolator zInterpolator = new ZInterpolator(0.2f);
- private final DecelerateInterpolator decelerate = new DecelerateInterpolator(1.8f);
+ private final DecelerateInterpolator decelerate = new DecelerateInterpolator(0.75f);
+ private final ZInterpolator zInterpolator = new ZInterpolator(0.13f);
public float getInterpolation(float input) {
return decelerate.getInterpolation(zInterpolator.getInterpolation(input));