summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2011-07-25 17:04:23 -0700
committerMichael Jurka <mikejurka@google.com>2011-07-25 17:04:23 -0700
commitc1a036b5ebacdeb564502bacc740fd85803a7638 (patch)
treee2161004bedb2f9543a38b5147bf6c93a8300110 /src
parenta22194bd9ff845775f91bff719322aba2522d32c (diff)
downloadandroid_packages_apps_Trebuchet-c1a036b5ebacdeb564502bacc740fd85803a7638.tar.gz
android_packages_apps_Trebuchet-c1a036b5ebacdeb564502bacc740fd85803a7638.tar.bz2
android_packages_apps_Trebuchet-c1a036b5ebacdeb564502bacc740fd85803a7638.zip
Fixing bug where workspaces were visible in All Apps
- fixed bug #5063358 - some code cleanup as well
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher2/Workspace.java28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 035d9ea4d..4ee79a2da 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -1369,16 +1369,12 @@ public class Workspace extends SmoothPagedView
final int screenCount = getChildCount();
float totalWidth = screenCount * scaledPageWidth + (screenCount - 1) * extraScaledSpacing;
+ // We shrink and disappear to nothing
boolean isPortrait = getMeasuredHeight() > getMeasuredWidth();
- float y = (isPortrait ?
+ float y = screenHeight - scaledPageHeight - (isPortrait ?
getResources().getDimension(R.dimen.allAppsSmallScreenVerticalMarginPortrait) :
getResources().getDimension(R.dimen.allAppsSmallScreenVerticalMarginLandscape));
- float finalAlpha = 1.0f;
- float extraShrinkFactor = 1.0f;
-
- // We shrink and disappear to nothing
- y = screenHeight - y - scaledPageHeight;
- finalAlpha = 0.0f;
+ float finalAlpha = 0.0f;
int duration = res.getInteger(R.integer.config_appsCustomizeWorkspaceShrinkTime);
@@ -1402,7 +1398,6 @@ public class Workspace extends SmoothPagedView
mUnshrinkAnimationEnabled = false;
mShrinkAnimationEnabled = true;
- final int childCount = getChildCount();
initAnimationArrays();
for (int i = 0; i < screenCount; i++) {
@@ -1428,17 +1423,17 @@ public class Workspace extends SmoothPagedView
mOldRotationYs[i] = cl.getRotationY();
mNewTranslationXs[i] = x;
mNewTranslationYs[i] = y;
- mNewScaleXs[i] = shrinkFactor * rotationScaleX * extraShrinkFactor;
- mNewScaleYs[i] = shrinkFactor * rotationScaleY * extraShrinkFactor;
+ mNewScaleXs[i] = shrinkFactor * rotationScaleX;
+ mNewScaleYs[i] = shrinkFactor * rotationScaleY;
mNewBackgroundAlphas[i] = finalAlpha;
mNewRotationYs[i] = rotation;
} else {
cl.setX((int)x);
cl.setY((int)y);
- cl.setScaleX(shrinkFactor * rotationScaleX * extraShrinkFactor);
- cl.setScaleY(shrinkFactor * rotationScaleY * extraShrinkFactor);
+ cl.setScaleX(shrinkFactor * rotationScaleX);
+ cl.setScaleY(shrinkFactor * rotationScaleY);
cl.setBackgroundAlpha(finalAlpha);
- cl.setAlpha(finalAlpha);
+ cl.setFastAlpha(finalAlpha);
cl.setRotationY(rotation);
mShrinkAnimationListener.onAnimationEnd(null);
}
@@ -1531,6 +1526,13 @@ public class Workspace extends SmoothPagedView
showBackgroundGradientForAllApps();
}
+ @Override
+ protected void updateAdjacentPagesAlpha() {
+ if (!isSmall()) {
+ super.updateAdjacentPagesAlpha();
+ }
+ }
+
/*
* This interpolator emulates the rate at which the perceived scale of an object changes
* as its distance from a camera increases. When this interpolator is applied to a scale