diff options
author | Adam Cohen <adamcohen@google.com> | 2013-10-12 01:24:57 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-10-12 01:24:57 +0000 |
commit | 982470ead562f5cb99e9bf5a26610473737b4a5f (patch) | |
tree | fb0e7d9a4f8010252281be0adb51c28471ce9184 /src | |
parent | 920a9c2577e1a6d08f84529d56e96da8cf25acd3 (diff) | |
parent | fa2450a9ffa8bfaf7866b914cbd4bf5bd807e1f0 (diff) | |
download | android_packages_apps_Trebuchet-982470ead562f5cb99e9bf5a26610473737b4a5f.tar.gz android_packages_apps_Trebuchet-982470ead562f5cb99e9bf5a26610473737b4a5f.tar.bz2 android_packages_apps_Trebuchet-982470ead562f5cb99e9bf5a26610473737b4a5f.zip |
Merge "Speed up overview transition" into jb-ub-now-indigo-rose
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher3/Workspace.java | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 4f263d0a3..1d5b5ac90 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -1996,9 +1996,15 @@ public class Workspace extends SmoothPagedView } } - final int duration = workspaceToAllApps ? - getResources().getInteger(R.integer.config_workspaceUnshrinkTime) : - getResources().getInteger(R.integer.config_appsCustomizeWorkspaceShrinkTime); + final int duration; + if (workspaceToAllApps) { + duration = getResources().getInteger(R.integer.config_workspaceUnshrinkTime); + } else if (workspaceToOverview || overviewToWorkspace) { + duration = getResources().getInteger(R.integer.config_overviewTransitionTime); + } else { + duration = getResources().getInteger(R.integer.config_appsCustomizeWorkspaceShrinkTime); + } + for (int i = 0; i < getChildCount(); i++) { final CellLayout cl = (CellLayout) getChildAt(i); boolean isCurrentPage = (i == getNextPage()); @@ -2033,6 +2039,7 @@ public class Workspace extends SmoothPagedView final View overviewPanel = mLauncher.getOverviewPanel(); final View hotseat = mLauncher.getHotseat(); if (animated) { + anim.setDuration(duration); LauncherViewPropertyAnimator scale = new LauncherViewPropertyAnimator(this); scale.scaleX(mNewScale) .scaleY(mNewScale) @@ -2051,14 +2058,13 @@ public class Workspace extends SmoothPagedView LauncherViewPropertyAnimator alphaAnim = new LauncherViewPropertyAnimator(cl.getShortcutsAndWidgets()); alphaAnim.alpha(mNewAlphas[i]) - .setDuration(duration) .setInterpolator(mZoomInInterpolator); anim.play(alphaAnim); } if (mOldBackgroundAlphas[i] != 0 || mNewBackgroundAlphas[i] != 0) { ValueAnimator bgAnim = - LauncherAnimUtils.ofFloat(cl, 0f, 1f).setDuration(duration); + LauncherAnimUtils.ofFloat(cl, 0f, 1f); bgAnim.setInterpolator(mZoomInInterpolator); bgAnim.addUpdateListener(new LauncherAnimatorUpdateListener() { public void onAnimationUpdate(float a, float b) { |