Sub Globals
Dim ListView1 As ListView
Dim lstname,lstpid, lstnamepid, lstret As List
Dim OS As OperatingSystem
End Sub
Sub Activity_Create(FirstTime As Boolean)
ListView1.Initialize("")
Activity.AddView(ListView1,0,0,100%x,100%y)
ActualizarProcesos
end sub
Sub ActualizarProcesos
Dim Texto As String
Dim cambiar As Boolean
OS.Initialize("OS")
lstname.Initialize
lstpid.Initialize
lstnamepid.Initialize
lstret=OS.RunningAppProcessInfo(lstname,lstpid,lstnamepid)
ListView1.Clear
ListView1.FastScrollEnabled = False
ListView1.Color = Colors.Blue
ListView1.SingleLineLayout.Label.TextSize = 17
ListView1.SingleLineLayout.Label.Gravity = Gravity.Left
'lstname.Sort(True) ' por si lo quieres ordenado
cambiar = False
For i = 0 To lstname.Size - 1
Texto = lstname.Get(i)
ListView1.AddSingleLine(Texto)
If cambiar Then
ListView1.SingleLineLayout.Label.TextColor = Colors.White
Else
ListView1.SingleLineLayout.Label.TextColor = Colors.Cyan
End If
cambiar = Not(cambiar)
DoEvents
Next
Activity.Title= "Procesos en marcha: " & lstname.Size
ListView1.SetSelection (0)
End Sub