Sub Process_Globals
End Sub
Sub Globals
Dim TestArray(10) As String
Dim CurrentItem As Int = 0
Dim Button1 As Button
Dim Button2 As Button
Dim Label1 As Label
Dim Text1 As EditText
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("TestArray")
Button1.Text = "Prev"
Button2.Text = "Next"
TestArray = Array As String ("Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "Item8", "Item9", "Item10")
CurrentItem = 0
Label1.Text = TestArray(CurrentItem)
End Sub
Sub Text1_EnterPressed ' BARCODE SCANNER ENTERED TEXT
TestArray(CurrentItem) = Text1.Text
Label1.Text = TestArray(CurrentItem)
Text1.Text = ""
End Sub
Sub Button1_Click
CurrentItem = CurrentItem - 1
If CurrentItem < 0 Then CurrentItem = 9
Label1.Text = TestArray(CurrentItem)
Text1.RequestFocus()
End Sub
Sub Button2_Click
CurrentItem = CurrentItem + 1
If CurrentItem > 9 Then CurrentItem = 0
Label1.Text = TestArray(CurrentItem)
Text1.RequestFocus()
End Sub