So why do you declare 6 ImageViews.. ??
Dim im(6) As ImageView
Will it ALWAYS be 5 imageviews ??
Will the value of
File.ReadString(File.DirInternal,"ffnumerodecombos.txt") ... Always be 5 ? if so why not just use ..
Also a Tip (this might not apply to your final code) ... when you show the same image in different imageViews .. load it Once only then reuse the Bitmap ie:
Dim bmp As Bitmap = LoadBitmap(File.DirAssets,"argentina.png")
'.........
im(i).Bitmap= bmp
But in answer to your last post .. Use the .Tag property to store information which can be extracted later ...
'if you are loading a different image each time .. this will happen in the For loop as per your original code.
Dim bmp As Bitmap = LoadBitmap(File.DirAssets,"argentina.png")
Dim im(5) As ImageView
For i = 0 To 4 ' OR File.ReadString(File.DirInternal,"ffnumerodecombos.txt") -1
im(i).Initialize("im")
im(i).Bitmap= bmp
im(i).Tag = "http://g3dsoftware.ddns.net:8080/neater/hola"&i&".png"
scrollviewff.Panel.AddView(im(i),2%x,15%y*i,96%x,20%y)
Dim links As Map 'is the map neccessary now ?? .. or just pass im(i).Tag value ?
links.Initialize
links.Put(im(i), "http://g3dsoftware.ddns.net:8080/neater/hola"&i&".png")
CallSubDelayed2(ImageDownloader, "Download", links)
Next
End Sub
Sub im_Click
Dim iv As ImageView = Sender
Log (iv.tag)
End Sub
PS .. afterthought ... If you find your want to load a random set of images , maybe something like this worked into your code.
Dim numImages As Int = File.ReadString(File.DirInternal,"ffnumerodecombos.txt")
Dim bmp As Bitmap = LoadBitmap(File.DirAssets,"argentina.png")
Dim im(numImages) As ImageView
For i = 0 To numImages - 1
'...................................
It might be wise to start a new thread for any New Questions ...