Skip to content Skip to sidebar Skip to footer

Viewgroup Throwing Nullpointerexception In Dispatchdragevent

I am in the process of coding a drag and drop library for GridViews. I am almost complete...however, I am getting an annoying NullPointerException upon ACTION_DROP every now and th

Solution 1:

I have the same exception, because I'm removing a ViewGroup which contains draggable views when I handle case DragEvent.ACTION_DRAG_ENDED.

My solution: delay the execution of removeView method by using post(runnable) method.

Post a Comment for "Viewgroup Throwing Nullpointerexception In Dispatchdragevent"