Sunday 15 May 2011

android - drag an image on a gridview item and get the position of the item on which the image is dragged -



android - drag an image on a gridview item and get the position of the item on which the image is dragged -

i have taken gridview , added images , textview it. having image below gridview can dragged , dropped on gridview. problem not able retrieve position of particular item on image dragged.

i thankful answers.

you didnt share much code, not easy give specific solution problems. assume you're using ontouchevent interface, if are, when drop image, motionevent.action_up, need store x , y coordinates of image dropped (event.getx() , event.gety()).

then position need gridview.pointtoposition(x,y).

hope helps in way.

android

No comments:

Post a Comment