drag listview but the whole screen's scarollbar will move too
<p>i drag listview's item  to change its position  but when i  drag , the whole screen's scarollbar  will move too</p>

<p>how to fix this problem ?</p>

<p><img src="http://i.stack.imgur.com/ZXbsA.png" alt="enter image description here"></p>

<p>this is my drag code to drag list item</p>

<p>public class DragListView extends ListView {</p>

<pre><code>private ImageView dragImageView;
private int dragSrcPosition;
private int dragPosition;
private int dragPoint;
private int dragOffset;

private WindowManager windowManager;
private WindowManager.LayoutParams windowParams;

private int scaledTouchSlop;
private int upScrollBounce;
private int downScrollBounce;

public DragListView(Context context, AttributeSet attrs) {
    super(context, attrs);
    scaledTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();

}


@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {  

   if(ev.getAction()==MotionEvent.ACTION_DOWN){
        int x = (int)ev.getX();
        int y = (int)ev.getY();

        dragSrcPosition = dragPosition = pointToPosition(x, y);
        if(dragPosition==AdapterView.INVALID_POSITION){  
            return super.onInterceptTouchEvent(ev);
        }

        ViewGroup itemView = (ViewGroup) getChildAt(dragPosition-getFirstVisiblePosition());


        dragPoint = y - itemView.getTop();
        dragOffset = (int) (ev.getRawY() - y);



        View dragger = itemView.findViewById(R.id.drag_list_item_image);


        if(dragger!=null&amp;&amp;x&gt;dragger.getLeft()-20){


            upScrollBounce = Math.min(y-scaledTouchSlop, getHeight()/3);
            downScrollBounce = Math.max(y+scaledTouchSlop, getHeight()*2/3);


            itemView.setDrawingCacheEnabled(true);
            Bitmap bm = Bitmap.createBitmap(itemView.getDrawingCache());

            ontouchevent()move)
            startDrag(bm, y);
        }
        return false;
     }
     return super.onInterceptTouchEvent(ev);
}


@Override
public boolean onTouchEvent(MotionEvent ev) {
    if(dragImageView!=null&amp;&amp;dragPosition!=INVALID_POSITION){  


        int action = ev.getAction();
        switch(action){
            case MotionEvent.ACTION_UP:
                int upY = (int)ev.getY();
                stopDrag();
                onDrop(upY);
                break;
            case MotionEvent.ACTION_MOVE:
                int moveY = (int)ev.getY();
                onDrag(moveY);
                break;
            default:break;
        }
        return true;
    }

    return super.onTouchEvent(ev);
}


public void startDrag(Bitmap bm ,int y){

    int tem;
    stopDrag();

    windowParams = new WindowManager.LayoutParams();


    windowParams.gravity = Gravity.TOP;
    windowParams.x = 0-193;   //have change  carefull

    windowParams.y = y - dragPoint + dragOffset;
    windowParams.width = WindowManager.LayoutParams.WRAP_CONTENT;
    windowParams.height = WindowManager.LayoutParams.WRAP_CONTENT;


    windowParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
                        | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
                        | WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON
                        | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;
    windowParams.format = PixelFormat.TRANSLUCENT;
    windowParams.windowAnimations = 0;

    ImageView imageView = new ImageView(getContext()); 
    imageView.setImageBitmap(bm);
    windowManager = (WindowManager)getContext().getSystemService("window");
    windowManager.addView(imageView, windowParams);
    dragImageView = imageView;    
}


public void stopDrag(){
    if(dragImageView!=null){
        windowManager.removeView(dragImageView);
        dragImageView = null;
    }
}


public void onDrag(int y){
    if(dragImageView!=null){  
        windowParams.alpha = 0.8f;
        windowParams.y = y - dragPoint + dragOffset; 
        windowManager.updateViewLayout(dragImageView, windowParams); 
    }

    int tempPosition = pointToPosition(0, y); 
    if(tempPosition!=INVALID_POSITION){
        dragPosition = tempPosition;
    }

    //簎笆
    int scrollHeight = 0;
    if(y&lt;upScrollBounce){
        scrollHeight = 8;
    }else if(y&gt;downScrollBounce){
        scrollHeight = -8;
    }

    if(scrollHeight!=0){

        setSelectionFromTop(dragPosition, getChildAt(dragPosition-getFirstVisiblePosition()).getTop()+scrollHeight);
    }
}


public void onDrop(int y){


    int tempPosition = pointToPosition(0, y); 
    if(tempPosition!=INVALID_POSITION){      
        dragPosition = tempPosition;
    }


    if(y&lt;getChildAt(1).getTop()){      

        dragPosition = 1;
    }else if(y&gt;getChildAt(getChildCount()-1).getBottom()){

        dragPosition = getAdapter().getCount()-1;
    }

    if(dragPosition&gt;0&amp;&amp;dragPosition&lt;getAdapter().getCount()){
        @SuppressWarnings("unchecked")
        DragListAdapter adapter = (DragListAdapter)getAdapter();
        adapter.getContext().getApplicationContext() ;
       String dragItem = adapter.getItem(dragSrcPosition);
       adapter.set_col(dragPosition,dragSrcPosition);
       adapter.remove(dragItem);             
       adapter.insert(dragItem, dragPosition);
       Toast.makeText(getContext(), adapter.getList().toString(), Toast.LENGTH_SHORT).show();
    }

}
</code></pre>

<p>}</p>
