I was looking in to Erel Drag and move but seem to have a problem initializing an image. Does not work with array of Type.
B4X:
Sub Globals
Type testImage (Imv As ImageView, datatest as string)
Dim dv1 As DragMove 'class module
End Sub
B4X:
Sub Activity_Create(FirstTime As Boolean)
dim ImageTest(3) as testImage
ImageTest(0).Imv.initialize("")
dv1.Initialize(Activity, ImageTest(0).Imv, Me, "Panel12")
End Sub
B4X:
Public Sub Initialize(Activity As Activity, v As View, vCallback As Object, vEventName As String)
innerView = v
panel1.Initialize("")
panel1.Color = Colors.Transparent
Activity.AddView(panel1, v.Left, v.Top, v.Width, v.Height)
ACTION_DOWN = Activity.ACTION_DOWN
ACTION_MOVE = Activity.ACTION_MOVE
ACTION_UP = Activity.ACTION_UP
EventName = vEventName
CallBack = vCallback
Dim r As Reflector
r.Target = panel1
r.SetOnTouchListener("Panel1_Touch") 'why reflection instead of the regular Panel_Touch event? Good question which deserves a forum thread of its own (not related to classes)...
tmrTime.Initialize("tmrTime", 1000)
End Sub