I am trying to modify the TouchListView component to allow me to drag an item from a list view over another view, to create a drag and drop selection system. The user will drag a list item and release it to indicate the selection.
So far I have modified the onDrop method of the DropListener class to pass along the MotionEvent. And I am using the getY() method of the motion even to determine if the user dropped the dragged view over the image view. I am using the raw value of getY() and if it is less than -50 I am accepting that as a valid drop.
But I am concerned, that this is a rather kludgy solution, and prone to errors. Is there a better way to determine when the user has released over the target view area? Are there cases in which i cannot simply look for a negative number? Is there a way to actually see what view lies beneath a given set of X/Y coordinates?
Please note the attached picture of the layout in-progress.

Here is the solution that i came up with that worked.
The code includes a lot of comments and varaibles getting calculated each time, which I will refactor out. But you can modify the TouchListView demo to make this work on your own.
Here is the main.xml layout I used.
Thanks again CommonsWare for your excellent TouchListView Widget.