Cleaning up some spring-loaded related dragging code. Allow cancel spring loaded mode.

Change-Id: Ie1f0468c563bed7abc1aa6416e222cdb0853c03a
This commit is contained in:
Winson Chung committed 2011-07-06 20:48:45 -07:00
1 parent d044526d82
commit c07918d005
9 files changed
+219 -215

No files matched your search

+15 -15
View File
@@ -1402,6 +1402,21 @@ public class CellLayout extends ViewGroup {
return foundCell;
}
/**
* A drag event has begun over this layout.
* It may have begun over this layout (in which case onDragChild is called first),
* or it may have begun on another layout.
*/
void onDragEnter() {
if (!mDragging) {
// Fade in the drag indicators
if (mCrosshairsAnimator != null) {
mCrosshairsAnimator.animateIn();
}
}
mDragging = true;
}
/**
* Called when drag has left this CellLayout or has been completed (successfully or not)
*/
@@ -1453,21 +1468,6 @@ public class CellLayout extends ViewGroup {
lp.isDragging = true;
}
/**
* A drag event has begun over this layout.
* It may have begun over this layout (in which case onDragChild is called first),
* or it may have begun on another layout.
*/
void onDragEnter() {
if (!mDragging) {
// Fade in the drag indicators
if (mCrosshairsAnimator != null) {
mCrosshairsAnimator.animateIn();
}
}
mDragging = true;
}
/**
* Computes a bounding rectangle for a range of cells
*