Sub Globals
Dim Cards As List 'shall hold the List of ImageViews
Dim dvCards As List 'shall hold the List of draggableViews
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("layoutMain") 'this layout is empty
Dim i As Int
Cards.Initialize 'initialize the List
dvCards.Initialize 'initialize the List
For i =0 To 20
Dim ivCard As ImageView 'declare an ImageView, for each loop a new one!
ivCard.Initialize("ivCard") 'intialize the ImageView
Cards.Add(ivCard) 'add it to the List
Dim dvCard As clDraggableView 'declare an DraggableView, for each loop a new one
dvCards.Initialize(Activity,ivCard)'intialize the DraggableView
dvCards.Add(dvCard) 'add it to the List
Next
End Sub