public boolean onInterceptTouchEvent(MotionEvent ev){
  @SuppressWarnings("all") final boolean debug=false;
  if (debug) {
    Log.d(Launcher.TAG,"DragController.onInterceptTouchEvent " + ev + " mDragging="+ mDragging);
  }
  if (mIsAccessibleDrag) {
    return false;
  }
  acquireVelocityTrackerAndAddMovement(ev);
  final int action=ev.getAction();
  final int[] dragLayerPos=getClampedDragLayerPos(ev.getX(),ev.getY());
  final int dragLayerX=dragLayerPos[0];
  final int dragLayerY=dragLayerPos[1];
switch (action) {
case MotionEvent.ACTION_MOVE:
    break;
case MotionEvent.ACTION_DOWN:
  mMotionDownX=dragLayerX;
mMotionDownY=dragLayerY;
mLastDropTarget=null;
break;
case MotionEvent.ACTION_UP:
mLastTouchUpTime=System.currentTimeMillis();
if (mDragging) {
PointF vec=isFlingingToDelete(mDragObject.dragSource);
if (!DeleteDropTarget.supportsDrop(mDragObject.dragInfo)) {
vec=null;
}
if (vec != null) {
dropOnFlingToDeleteTarget(dragLayerX,dragLayerY,vec);
}
 else {
drop(dragLayerX,dragLayerY);
}
}
endDrag();
break;
case MotionEvent.ACTION_CANCEL:
cancelDrag();
break;
}
return mDragging;
}

public boolean onInterceptTouchEvent ( MotionEvent ev ) { @ SuppressWarnings ( "all" ) final boolean debug = false ; if ( debug ) { Log . d ( Launcher . TAG , "DragController.onInterceptTouchEvent " + ev + " mDragging=" + mDragging ) ; } if ( mIsAccessibleDrag ) { return false ; } acquireVelocityTrackerAndAddMovement ( ev ) ; final int action = ev . getAction ( ) ; final int [ ] dragLayerPos = getClampedDragLayerPos ( ev . getX ( ) , ev . getY ( ) ) ; final int dragLayerX = dragLayerPos [ 0 ] ; final int dragLayerY = dragLayerPos [ 1 ] ; switch ( action ) { case MotionEvent . ACTION_MOVE : break ; case MotionEvent . ACTION_DOWN : mMotionDownX = dragLayerX ; mMotionDownY = dragLayerY ; mLastDropTarget = null ; break ; case MotionEvent . ACTION_UP : mLastTouchUpTime = System . currentTimeMillis ( ) ; if ( mDragging ) { PointF vec = isFlingingToDelete ( mDragObject . dragSource ) ; if ( ! DeleteDropTarget . supportsDrop ( mDragObject . dragInfo ) ) { vec = null ; } if ( vec != null ) { dropOnFlingToDeleteTarget ( dragLayerX , dragLayerY , vec ) ; } else { drop ( dragLayerX , dragLayerY ) ; } } endDrag ( ) ; break ; case MotionEvent . ACTION_CANCEL : cancelDrag ( ) ; break ; } return mDragging ; }
call this from a drag source view .
