Android Listview OnDragListener Item Position On Drop

487 views Asked by At

I attached a listener on my listview in my Main Activity as such:

myListView.OnDragListener(...);

Inside getView() of my Custom Adapter, I have an onTouchListener which starts the DragShadowBuilder which renders an image of that specific Listview item which can follow my finger around.

What I need to do back in the Main Activity is to somehow tell which "position" of myListView am I dropping the image in. How can I do this?

I've tried setting Tags in the custom adapter, but the problem with that is that the entire listview is the View for onDragListener so it can't differentiate between the items inside the listview. Too bad I can't use onItemClickListener...

Any ideas? Thanks!

0

There are 0 answers