Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("Layout1")
Dim X As Int = 0
Dim Y As Int = 0
For i=0 To 8
Dim L As Label
ListLab(i)=L ' salva label in array
L.Initialize("Label")
L.Color=Colors.Transparent
L.Tag=""
'Cornice nera
Dim C As ColorDrawable
C.Initialize2(Colors.White,0,1dip,Colors.Black)
L.Background=C
'distribusci label nel pannello
PanelMain.AddView(L,X+20dip,Y+20dip,80dip,80dip)
X=X+100dip
If X>200dip Then
X=0
Y=Y+100dip
End If
Next
Do While time
Dim casella As Int = Rnd(0,9)
Colora(ListLab(casella))
Sleep(0)
If LastLabel.IsInitialized Then TornaBianco(LastLabel)
LastLabel=ListLab(casella)
Sleep(duratatimer)
Loop
End Sub