mrKlar / PagedDragDropGrid

An Android ViewGroup that implements a paged grid with drag'n'drop moveable items
406 stars 185 forks source link

LongClick then Drop Issue #54

Open nyahahawakoko opened 10 years ago

nyahahawakoko commented 10 years ago

When I long click on an item, then drop it immediately, it performs an onClick event. In one way or another this might be a bug? I have managed to fix this by changing the return value of DragDropGrid#onTouch(View, MotionEvent), instead returning false directly I changed it with super.onThouchEvent(MotionEvent)

I also noticed that when I will long click on an item near (using the emulator my mouse pointer is about 5-10dip near) the delete view (not intersected with the delete view), then drop it, the item will disappear. I have also managed to fix it by calling the touchMove(event); on the first line of DragDropGrid#touchUp(MotionEvent) method.

I don't know if my fixes were correct, but it managed to fix my issues.