public void onDrop(DragSource source, int x, int y, int xOffset, int yOffset, Object dragInfo) {
if (source != this) {
} else {
if (mDragInfo != null) {
mDragInfo = null;
}
}
}
public void snapToGroup(int index) {
CellLayout cellLoyout = (CellLayout) getChildAt(index, 0);
if (cellLoyout != null) {
cellLoyout.stopAnimation(); // stop animation.
}
if (DragLayer.isDragging()) {
if (mLauncher != null && mLauncher.getDragLayer() != null){
mLauncher.getDragLayer().snap2GroupWings();
}
cellLoyout = (CellLayout) getCurrentCellLayout();
if (cellLoyout != null && isScrollerFinished()) {
cellLoyout.finishZoomInAnimation();
}
if (mDragInfo != null && mDragInfo.cell != null) {
mDragInfo.cell.setVisibility(View.GONE); // hide view of drag while switch group.
}
}
FadeAnimationView.goToscreenWithAnimation(index, 0, mLauncher);
}
public boolean isScrollerFinished() {
return mScroller.isFinished();
}