summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2013-10-11 18:20:27 -0700
committerAdam Cohen <adamcohen@google.com>2013-10-11 18:23:08 -0700
commitfa2450a9ffa8bfaf7866b914cbd4bf5bd807e1f0 (patch)
treeeb8f79967a10ba1bd74412eba6b1d0cca99db953 /src
parent58993ad14da65dac1e43f3490cba8f751c92085b (diff)
downloadandroid_packages_apps_Trebuchet-fa2450a9ffa8bfaf7866b914cbd4bf5bd807e1f0.tar.gz
android_packages_apps_Trebuchet-fa2450a9ffa8bfaf7866b914cbd4bf5bd807e1f0.tar.bz2
android_packages_apps_Trebuchet-fa2450a9ffa8bfaf7866b914cbd4bf5bd807e1f0.zip
Speed up overview transition
Change-Id: Ie4086717318939875228dd3a920cecf79ba0ff91
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/Workspace.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 1f4a07b64..38275b696 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -1974,9 +1974,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());
@@ -2011,6 +2017,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)
@@ -2029,14 +2036,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) {