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 committed 2010-09-29 13:04:32 -07:00
1 parent de7658b5e0
commit 0fb7db5a37
8 files changed
+122 -261

No files matched your search

+7 -35
View File
@@ -42,7 +42,7 @@ import android.view.animation.LayoutAnimationController;
import java.util.Arrays;
public class CellLayout extends ViewGroup implements Dimmable {
public class CellLayout extends ViewGroup {
static final String TAG = "CellLayout";
private int mCellWidth;
@@ -75,10 +75,8 @@ public class CellLayout extends ViewGroup implements Dimmable {
private float mBackgroundAlpha;
private final Rect mBackgroundLayoutRect = new Rect();
private Drawable mBackground;
private Drawable mBackgroundMini;
private Drawable mBackgroundMiniHover;
private Drawable mBackgroundHover;
// If we're actively dragging something over this screen and it's small,
// mHover is true
private boolean mHover = false;
@@ -139,12 +137,10 @@ public class CellLayout extends ViewGroup implements Dimmable {
if (LauncherApplication.isScreenXLarge()) {
final Resources res = getResources();
mBackgroundMini = res.getDrawable(R.drawable.mini_home_screen_bg);
mBackgroundMini.setFilterBitmap(true);
mBackground = res.getDrawable(R.drawable.home_screen_bg);
mBackground.setFilterBitmap(true);
mBackgroundMiniHover = res.getDrawable(R.drawable.mini_home_screen_bg_hover);
mBackgroundMiniHover.setFilterBitmap(true);
mBackgroundHover = res.getDrawable(R.drawable.mini_home_screen_bg_hover);
mBackgroundHover.setFilterBitmap(true);
mDragRectDrawable = res.getDrawable(R.drawable.rounded_rect_green);
mCrosshairsDrawable = res.getDrawable(R.drawable.gardening_crosshairs);
@@ -180,14 +176,7 @@ public class CellLayout extends ViewGroup implements Dimmable {
@Override
public void dispatchDraw(Canvas canvas) {
if (mBackgroundAlpha > 0.0f) {
Drawable bg;
if (mHover && getScaleX() < 0.5f) {
bg = mBackgroundMiniHover;
} else if (getScaleX() < 0.5f) {
bg = mBackgroundMini;
} else {
bg = mBackground;
}
final Drawable bg = mHover ? mBackgroundHover : mBackground;
bg.setAlpha((int) (mBackgroundAlpha * 255));
bg.draw(canvas);
}
@@ -239,20 +228,6 @@ public class CellLayout extends ViewGroup implements Dimmable {
}
}
public void setDimmableProgress(float progress) {
for (int i = 0; i < getChildCount(); i++) {
Dimmable d = (Dimmable) getChildAt(i);
d.setDimmableProgress(progress);
}
}
public float getDimmableProgress() {
if (getChildCount() > 0) {
return ((Dimmable) getChildAt(0)).getDimmableProgress();
}
return 0.0f;
}
@Override
public void cancelLongPress() {
super.cancelLongPress();
@@ -606,11 +581,8 @@ public class CellLayout extends ViewGroup implements Dimmable {
if (mBackground != null) {
mBackground.setBounds(mBackgroundLayoutRect);
}
if (mBackgroundMiniHover != null) {
mBackgroundMiniHover.setBounds(mBackgroundLayoutRect);
}
if (mBackgroundMini != null) {
mBackgroundMini.setBounds(mBackgroundLayoutRect);
if (mBackgroundHover != null) {
mBackgroundHover.setBounds(mBackgroundLayoutRect);
}
}