New folder visualization, renaming, staggering reorder
Change-Id: I62963d225e6ea5d2ec9d8ebc8a6d73099f5d6c7f
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index a9ba88d..c1aa2d5 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -298,6 +298,7 @@
mCountX = x;
mCountY = y;
mOccupied = new boolean[mCountX][mCountY];
+ requestLayout();
}
private void invalidateBubbleTextView(BubbleTextView icon) {
@@ -971,7 +972,8 @@
return mChildren.getChildAt(x, y);
}
- public boolean animateChildToPosition(final View child, int cellX, int cellY, int duration) {
+ public boolean animateChildToPosition(final View child, int cellX, int cellY, int duration,
+ int delay) {
CellLayoutChildren clc = getChildrenLayout();
if (clc.indexOfChild(child) != -1 && !mOccupied[cellX][cellY]) {
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
@@ -996,6 +998,10 @@
int newX = lp.x;
int newY = lp.y;
+ lp.x = oldX;
+ lp.y = oldY;
+ child.requestLayout();
+
PropertyValuesHolder x = PropertyValuesHolder.ofInt("x", oldX, newX);
PropertyValuesHolder y = PropertyValuesHolder.ofInt("y", oldY, newY);
ObjectAnimator oa = ObjectAnimator.ofPropertyValuesHolder(lp, x, y);
@@ -1023,6 +1029,7 @@
cancelled = true;
}
});
+ oa.setStartDelay(delay);
oa.start();
return true;
}