Android Question Drag and drop with image

asales

Expert
Licensed User
Longtime 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

  • basket.zip
    77.3 KB · Views: 600

webjefe

Member
Licensed User
Longtime 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:
Upvote 0

leonardo pino

Member
Licensed User
Longtime 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 [email protected]
 

Attachments

  • basket-test.png
    basket-test.png
    43.2 KB · Views: 380
Upvote 0

asales

Expert
Licensed User
Longtime 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 [email protected]

Hi leonardo.
I do not complete this project (with the drag and drop). Sorry.
 
Upvote 0

sorex

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

leonardo pino

Member
Licensed User
Longtime 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:
Upvote 0
Top