Enabling reordering

-> Reordering is enabled and persists
-> Fixed persistence issue when adding items to empty screen

Change-Id: I7c797b2c81a2988c95d8d9383be46d6ef0b7532d
This commit is contained in:
Adam Cohen
2013-07-11 14:21:49 -07:00
parent ce376639c8
commit dedbd962dc
4 changed files with 64 additions and 8 deletions

View File

@@ -113,6 +113,7 @@ public class CellLayout extends ViewGroup {
// If we're actively dragging something over this screen, mIsDragOverlapping is true
private boolean mIsDragOverlapping = false;
private final Point mDragCenter = new Point();
boolean mUseActiveGlowBackground = false;
// These arrays are used to implement the drag visualization on x-large screens.
// They are used as circular arrays, indexed by mDragOutlineCurrent.
@@ -383,10 +384,15 @@ public class CellLayout extends ViewGroup {
void setIsDragOverlapping(boolean isDragOverlapping) {
if (mIsDragOverlapping != isDragOverlapping) {
mIsDragOverlapping = isDragOverlapping;
setUseActiveGlowBackground(mIsDragOverlapping);
invalidate();
}
}
void setUseActiveGlowBackground(boolean use) {
mUseActiveGlowBackground = use;
}
boolean getIsDragOverlapping() {
return mIsDragOverlapping;
}
@@ -437,7 +443,7 @@ public class CellLayout extends ViewGroup {
if (mBackgroundAlpha > 0.0f) {
Drawable bg;
if (mIsDragOverlapping) {
if (mUseActiveGlowBackground) {
// In the mini case, we draw the active_glow bg *over* the active background
bg = mActiveGlowBackground;
} else {