Sub Process_Globals
Dim result As String
result = ""
End Sub
Sub Globals
Dim ListView1 As ListView
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("2")
For i = 1 To 100
ListView1.AddSingleLine("Item #" & i)
Next
End Sub
Sub Activity_Resume
'added:
If main.flagExit=1 Then 'if back was pressed on main activity
main.flagExit=0 'important: If the prg reside in memory you will allways have it set to 1 and
'you will be unable to do anything!
activity.Finish 'now discharge all without showing again activity2
End If
'end added
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub ListView1_ItemClick (Position As Int, Value As Object)
result = value 'store the value in the process global object.
StartActivity(Main) 'show the main activity again
End Sub