Reverting: "Animating the drag view scale up and down when dragging items."

Change-Id: I133ff2631834a4b97e1e4750fb7c07793ddeba69
This commit is contained in:
Winson Chung committed 2012-02-13 13:03:52 -08:00
1 parent 9659d0c3a5
commit a1cdab0392
11 files changed
+88 -86

No files matched your search

@@ -201,6 +201,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
private Canvas mCanvas;
private Drawable mDefaultWidgetBackground;
private IconCache mIconCache;
private int mDragViewMultiplyColor;
// Dimens
private int mContentWidth;
@@ -242,6 +243,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
Resources resources = context.getResources();
mDefaultWidgetBackground = resources.getDrawable(R.drawable.default_widget_preview_holo);
mAppIconSize = resources.getDimensionPixelSize(R.dimen.app_icon_size);
mDragViewMultiplyColor = resources.getColor(R.color.drag_view_multiply_color);
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.AppsCustomizePagedView, 0, 0);
mMaxAppCellCountX = a.getInt(R.styleable.AppsCustomizePagedView_maxAppCellCountX, -1);
@@ -578,6 +580,9 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
// Save the preview for the outline generation, then dim the preview
outline = Bitmap.createScaledBitmap(preview, preview.getWidth(), preview.getHeight(),
false);
mCanvas.setBitmap(preview);
mCanvas.drawColor(mDragViewMultiplyColor, PorterDuff.Mode.MULTIPLY);
mCanvas.setBitmap(null);
// Start the drag
alphaClipPaint = null;
@@ -903,6 +908,9 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
d.setBounds(x, y, x + w, y + h);
d.draw(c);
d.setBounds(oldBounds); // Restore the bounds
if (multiplyColor != 0xFFFFFFFF) {
c.drawColor(mDragViewMultiplyColor, PorterDuff.Mode.MULTIPLY);
}
c.setBitmap(null);
}
}