'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim manager As PreferenceManager
Dim screen As PreferenceScreen
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 btn As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Main.bal")
If FirstTime Then
CreatePreferenceScreen
If manager.GetAll.Size = 0 Then SetDefaults
End If
End Sub
Sub SetDefaults
manager.SetString("list2", "6 hr")
End Sub
Sub btn_Click
StartActivity(screen.CreateIntent)
End Sub
Sub CreatePreferenceScreen
screen.Initialize("Settings", "")
cat2.AddList("list2", "Update Frequency", "", "", _
Array As String("1 hr", "6 hr", "24 hr"))
screen.AddPreferenceCategory(cat2)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)'
End Sub