Android Question DraggableView Class interacting with other ImageViews objects?

Mark Thorndyke

Member
Licensed User
Longtime User
Hi,
I've used DraggableView class with success (https://www.b4x.com/android/forum/threads/classes-are-soon-coming.18395/) with a few bonuses added in to what I'm looking for.
I'm currently struggling, or maybe being a bit to ambitious into trying the impossible and perhaps need to look at alternative methods?

A quick overview:
I create >=3 images that can be freely dragged across the screen and dropped on to 1 of 3 possible static images. Dragging ok via classes with z-order and so on with releasing.
How is the best way to get this to reference any other ImageView or Panel outside the class to reference? Mainly for collisions and altering the objects it's interacting with appearance.

It's easy enough to reference variables outside the class via process_globals but not ImageViews or Panels.

Any suggestions?
 

Mark Thorndyke

Member
Licensed User
Longtime User
 
Upvote 0

Mark Thorndyke

Member
Licensed User
Longtime User
Thanks Erel for that. Had a play around with and works a treat. Thanks again for your quick response, muchly appreciated
 
Upvote 0

Mark Thorndyke

Member
Licensed User
Longtime User
Hi,
Thinking further down the line for another project away from the current one.
Is there a simplistic way for the following:

Having a number of draggable items generated referencing the original link above.
When an ACTION_DOWN occurs on one of these images created by the draggable class, it can reference one or more of the other draggable images using the same class and either disable and/or hide them. Seems simplistic but quick tests failed (including via lists but seem to get errors as referencing class objects, unless I've made a school boy error)
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…