OK, first of all I’m not sure I’m doing this right so I will explain what I want from my application:
I have a screen that split for two- from left a list of groups (for more specific- ExpandableListView), and in the left I have all kind of draggable buttons.
I want to let the user to drag each button to some group and then I’ll add the button text as child of this group.
So what I’ve tried to do is to add touchListener using (setOnTouchListener) to each button and realize to where the user drag it, so I now have the X and Y where the user release the btn, how can I know what list item is on the (x,y) point?
and if it is the right way doing it?
Thx.
Edit:
OK, for being more clear I’m adding a snapshot of screen:

what I want is to drag the button to some item in the list and doing something with the item that was selected (lets say- rename it)
OK, I got it- if somebody ever go here, this is how I solved it-
iterate over all list children and check whether this p=(x,y) is in the hit rect: