Fixing boot stall.

Revert "-Added 3D effect to home screen scrolling"

This reverts commit 9415d87eda.

Change-Id: Ib8d6602f5d82884eb1f6cc44c0cc71cc563a3a59
This commit is contained in:
Adam Cohen
2010-09-29 13:02:43 -07:00
parent de7658b5e0
commit 0fb7db5a37
8 changed files with 122 additions and 261 deletions
+1 -13
View File
@@ -78,7 +78,6 @@ public abstract class PagedView extends ViewGroup {
protected final static int TOUCH_STATE_SCROLLING = 1;
protected final static int TOUCH_STATE_PREV_PAGE = 2;
protected final static int TOUCH_STATE_NEXT_PAGE = 3;
protected final static float ALPHA_QUANTIZE_LEVEL = 0.01f;
protected int mTouchState = TOUCH_STATE_REST;
@@ -368,6 +367,7 @@ public abstract class PagedView extends ViewGroup {
if (mDirtyPageAlpha || (mTouchState == TOUCH_STATE_SCROLLING) || !mScroller.isFinished()) {
int halfScreenSize = getMeasuredWidth() / 2;
int screenCenter = mScrollX + halfScreenSize;
final int childCount = getChildCount();
for (int i = 0; i < childCount; ++i) {
View layout = (View) getChildAt(i);
@@ -391,12 +391,6 @@ public abstract class PagedView extends ViewGroup {
dimAlpha = Math.max(0.0f, Math.min(1.0f, (dimAlpha * dimAlpha)));
float alpha = 1.0f - dimAlpha;
if (alpha < ALPHA_QUANTIZE_LEVEL) {
alpha = 0.0f;
} else if (alpha > 1.0f - ALPHA_QUANTIZE_LEVEL) {
alpha = 1.0f;
}
if (Float.compare(alpha, layout.getAlpha()) != 0) {
layout.setAlpha(alpha);
}
@@ -406,16 +400,10 @@ public abstract class PagedView extends ViewGroup {
}
}
protected void screenScrolled(int screenCenter) {
}
@Override
protected void dispatchDraw(Canvas canvas) {
updateAdjacentPagesAlpha();
int halfScreenSize = getMeasuredWidth() / 2;
int screenCenter = mScrollX + halfScreenSize;
screenScrolled(screenCenter);
// Find out which screens are visible; as an optimization we only call draw on them
// As an optimization, this code assumes that all pages have the same width as the 0th
// page.