public void handleDrop(){
  if (mDraggedEntry != null) {
    if (isIndexInBound(mDragEnteredEntryIndex) && mDragEnteredEntryIndex != mDraggedEntryIndex) {
      mDropEntryIndex=mDragEnteredEntryIndex;
      mDragEntries.set(mDropEntryIndex,mDraggedEntry);
      cacheOffsetsForDataSetChange();
      notifyDataSetChanged();
    }
 else     if (isIndexInBound(mDraggedEntryIndex)) {
      mDragEntries.remove(mDragEnteredEntryIndex);
      mDragEntries.add(mDraggedEntryIndex,mDraggedEntry);
      mDropEntryIndex=mDraggedEntryIndex;
      notifyDataSetChanged();
    }
    mDraggedEntry=null;
    if (mDraggedEntryIndex != mDragEnteredEntryIndex) {
      mDragDropListener.onDataSetChangedForResult(mDragEntries);
    }
  }
}

public void handleDrop ( ) { if ( mDraggedEntry != null ) { if ( isIndexInBound ( mDragEnteredEntryIndex ) && mDragEnteredEntryIndex != mDraggedEntryIndex ) { mDropEntryIndex = mDragEnteredEntryIndex ; mDragEntries . set ( mDropEntryIndex , mDraggedEntry ) ; cacheOffsetsForDataSetChange ( ) ; notifyDataSetChanged ( ) ; } else if ( isIndexInBound ( mDraggedEntryIndex ) ) { mDragEntries . remove ( mDragEnteredEntryIndex ) ; mDragEntries . add ( mDraggedEntryIndex , mDraggedEntry ) ; mDropEntryIndex = mDraggedEntryIndex ; notifyDataSetChanged ( ) ; } mDraggedEntry = null ; if ( mDraggedEntryIndex != mDragEnteredEntryIndex ) { mDragDropListener . onDataSetChangedForResult ( mDragEntries ) ; } } }
drops the temporarily removed contact to the desired location in the list .
