Android Question Drag and drop with image

asales

Well-Known Member
Licensed User
Hi,

I want to use a drag and drop function with this my app (in attached).

I want to pick up a fruit image and drop it in the basket.

I'm using the PinchZoomAndMove class to drag the fruit but I don't know how I can capture the drop in the basket.

It's no necessary other action if I can know what image of fruit over the basket.

Thanks in advance to who can help me.
 

Attachments

webjefe

Member
Licensed User
Same question. The image movement works. How do I capture the drop?
PZ(c).Initialize( imb,"MyEvent",c,0.5,3,1.5,True,Me)
I already have the code to determine position in a function

Sub MyEvent_Action
' Here I determine the position.
End Sub

That sub never gets called. How do I setup the event function so it gets triggered when an image movement ends?

Thanks
 
Last edited:

leonardo pino

Member
Licensed User
Hi, I have the same question,
in my example I have two baskets (red and yellow)
when I'm trying to drag a red fruit to the red basket this stop there,
and when you drag the yellow fruit to the red basket, this back to initial position.
I try the event in panel1 and panel2, but I need help,

maybe you can negotiate this example, I really appreciate your work,

my mail desarrolloglobalcolombia@gmail.com
 

Attachments

asales

Well-Known Member
Licensed User
Hi, I have the same question,
in my example I have two baskets (red and yellow)
when I'm trying to drag a red fruit to the red basket this stop there,
and when you drag the yellow fruit to the red basket, this back to initial position.
I try the event in panel1 and panel2, but I need help,

maybe you can negotiate this example, I really appreciate your work,

my mail desarrolloglobalcolombia@gmail.com
Hi leonardo.
I do not complete this project (with the drag and drop). Sorry.
 

Informatix

Expert
Licensed User
Ok AS2,
thanks for your answer,
I'm a little disappointed with the Libraries tutorials,

thanks,
To make a "drag & drop", you can also use the Floating Windows class. It's maybe easier to do with it (look at the second demo).
 

sorex

Expert
Licensed User
Leonardo: you need to modify that PZ library and add drop events yourself.
 

leonardo pino

Member
Licensed User
thank you very much to all,
great contribution of Informatix,
The Floating Windows Class looks great for my case.
I'll review it.

I clicked to donate a coffee ;)
 
Last edited:
Top