summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authornebkat <nebkat@teamhacksung.org>2012-02-11 20:15:55 +0000
committernebkat <nebkat@teamhacksung.org>2012-02-16 13:12:22 +0000
commit5883db238421c3209fab1be5420e9137104672b6 (patch)
treeae2dc86a58d17b540f5d2f9355480b11c2ed31a0 /src
parenta61e5035e42e19c47bc666030de8252eeb454924 (diff)
downloadandroid_packages_apps_Trebuchet-5883db238421c3209fab1be5420e9137104672b6.tar.gz
android_packages_apps_Trebuchet-5883db238421c3209fab1be5420e9137104672b6.tar.bz2
android_packages_apps_Trebuchet-5883db238421c3209fab1be5420e9137104672b6.zip
AppsCustomizePagedView: Fix slow transition animations
Change-Id: Ic3ff2f1fdddba1615ff18f0659c3d5cc5a1338f9
Diffstat (limited to 'src')
-rw-r--r--src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java40
1 files changed, 16 insertions, 24 deletions
diff --git a/src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java b/src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java
index 27282f551..f3ca9e794 100644
--- a/src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java
+++ b/src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java
@@ -1573,8 +1573,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
float scrollProgress = getScrollProgress(screenScroll, v, i);
if (mFadeInAdjacentScreens) {
float alpha = 1 - Math.abs(scrollProgress);
- v.setFastAlpha(alpha);
- v.fastInvalidate();
+ v.setAlpha(alpha);
}
}
}
@@ -1588,16 +1587,14 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
float rotation = TRANSITION_SCREEN_ROTATION * scrollProgress;
float translationX = mLauncher.getWorkspace().getOffsetXForRotation(rotation, v.getWidth(), v.getHeight());
- v.setFastTranslationX(translationX);
- v.setFastRotationY(rotation);
+ v.setTranslationX(translationX);
+ v.setRotationY(rotation);
if (mFadeInAdjacentScreens) {
float alpha = 1 - Math.abs(scrollProgress);
- v.setFastAlpha(alpha);
+ v.setAlpha(alpha);
}
- v.fastInvalidate();
}
}
- invalidate();
}
private void screenScrolledZoom(int screenScroll, boolean in) {
@@ -1610,16 +1607,15 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
// Extra translation to account for the increase in size
if (!in) {
float translationX = v.getMeasuredWidth() * 0.1f * -scrollProgress;
- v.setFastTranslationX(translationX);
+ v.setTranslationX(translationX);
}
- v.setFastScaleX(scale);
- v.setFastScaleY(scale);
+ v.setScaleX(scale);
+ v.setScaleY(scale);
if (mFadeInAdjacentScreens) {
float alpha = 1 - Math.abs(scrollProgress);
- v.setFastAlpha(alpha);
+ v.setAlpha(alpha);
}
- v.fastInvalidate();
}
}
}
@@ -1645,12 +1641,11 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
}
v.setRotation(rotation);
- v.setFastTranslationX(translationX);
+ v.setTranslationX(translationX);
if (mFadeInAdjacentScreens) {
float alpha = 1 - Math.abs(scrollProgress);
- v.setFastAlpha(alpha);
+ v.setAlpha(alpha);
}
- v.fastInvalidate();
}
}
}
@@ -1670,8 +1665,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
v.setPivotX(scrollProgress < 0 ? 0 : v.getMeasuredWidth());
v.setPivotY(v.getMeasuredHeight() * 0.5f);
v.setRotationY(rotation);
- v.setFastAlpha(alpha);
- v.fastInvalidate();
+ v.setAlpha(alpha);
}
}
}
@@ -1695,22 +1689,20 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
alpha = mLeftScreenAlphaInterpolator.getInterpolation(1 - scrollProgress);
}
- v.setFastTranslationX(translationX);
- v.setFastScaleX(scale);
- v.setFastScaleY(scale);
- v.setFastAlpha(alpha);
+ v.setTranslationX(translationX);
+ v.setScaleX(scale);
+ v.setScaleY(scale);
+ v.setAlpha(alpha);
// If the view has 0 alpha, we set it to be invisible so as to prevent
// it from accepting touches
- if (alpha <= 0) {
+ if (alpha <= ViewConfiguration.ALPHA_THRESHOLD) {
v.setVisibility(INVISIBLE);
} else if (v.getVisibility() != VISIBLE) {
v.setVisibility(VISIBLE);
}
- v.fastInvalidate();
}
}
- invalidate();
}
// Transition effects