Sub Globals
Dim PZ(10) As PinchZoomAndMove
Dim NumView As Int
Dim imv(10) As ImageView
End Sub
Sub Activity_Create(FirstTime As Boolean)
Dim bmp As Bitmap
Dim vWidth,vHeight As Float
Dim c As Int
For c = 0 To PZ.Length-1
bmp = LoadBitmap(File.DirAssets,"avatar_"&c&".png")
vWidth = bmp.Width*2
vHeight = vWidth*(bmp.Height/bmp.Width)
imv(c).Initialize("")
imv(c).Bitmap = bmp
imv(c).Gravity = Gravity.FILL
Activity.AddView(imv(c),50%x-(vWidth/2),50%y-(vHeight/2),vWidth,vHeight)
imv(c).Left = Rnd(5dip,Activity.Width-imv(c).Width-5dip)
imv(c).top = Rnd(5dip,Activity.Height-imv(c).Height-5dip)
'------------------------------
PZ(c).Initialize(imv(c),"PZ",c,0.5,3,1.5,True)
Next
End Sub