'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim lv As ListView
Dim lb As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
lb.Initialize ("label")
lb.Text="tap here"
lb.Gravity =Gravity.CENTER
Activity.AddView (lb,0,0,Activity.Width/2,36dip)
lv.Initialize ("list")
Activity.Addview (lv,0,lb.Height,lb.Width,Activity.Height/2)
lv.Visible =False
For k=0 To 9
lv.AddSingleLine ("item " & k)
Next
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub label_click
lv.Visible =True:lv.RequestFocus
End Sub
Sub list_ItemClick (Position As Int, Value As Object)
lb.Text=lv.GetItem (Position)
lv.Visible =False
End Sub