Code example for WindowManager

Methods: removeView

0
    } 
 
    private void stopDragging() { 
        if (mDragView != null) {
            WindowManager wm = (WindowManager)getContext().getSystemService("window");
            wm.removeView(mDragView);
            mDragView.setImageDrawable(null);
            mDragView = null;
        } 
        if (mDragBitmap != null) {
            mDragBitmap.recycle();
            mDragBitmap = null;
        } 
    } 
 
    public void setDragListener(DragListener l) {
        mDragListener = l;
    } 
 
    public void setDropListener(DropListener l) {
        mDropListener = l;