bauerca / drag-sort-listview

Android ListView with drag and drop reordering.
3.2k stars 1.44k forks source link

List items taller than the ListView itself are not draggable #99

Open goncalossilva opened 11 years ago

goncalossilva commented 11 years ago

It's quite simple. I have a list with various items of various sizes. A couple of them are taller than the ListView itself. I cannot drag them, regardless of what I try.

What do you think is the source of this issue?

bauerca commented 11 years ago

I think I see the problem. Unfortunately, I'm not sure at the moment how to go about fixing this while keeping another feature intact. Try this in your checked out version of the library:

Lines 1797-8:

int minY = Math.min(y, mFloatViewMid + mFloatViewHeightHalf);
int maxY = Math.max(y, mFloatViewMid - mFloatViewHeightHalf);

change to

int minY = y;
int maxY = y;

Let me know if that doesn't help. Thanks.

goncalossilva commented 11 years ago

I'll give it a run tomorrow first thing. Thanks for getting back to me!

Which other feature would this break?

goncalossilva commented 11 years ago

Unfortunately, no. Even if I change those lines, the behaviour appears to be the same. Any other ideas? :-)

bauerca commented 11 years ago

The broken feature would be dragscrolling coming to a smooth stop when the dragged item cannot be dragged any higher or lower. It's conceivable that with many headers or footers, (or if the floating view travel is restricted by some other means) that one could continue dragscrolling and leave the floating view behind (to disappear offscreen). Maybe not such a big deal.

However, my suggestion didn't work, so I'm a little flummoxed. I apologize I don't have much time to devote to this bug at the moment!!

goncalossilva commented 11 years ago

Alright.