#Region Project Attributes
#ApplicationLabel: WheelPicker
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: portrait
#CanInstallToExternalStorage: False
#End Region
#AdditionalRes: ..\wheelpicker_resource
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
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.
Private wp1 As WheelPicker
Private wp2 As WheelPicker
Dim mydaylist As List
Dim mymonthlist As List
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("main")
wp1.Curved = True
wp1.Cyclic = True
wp1.CurtainColor = Colors.ARGB(50, 255, 255, 255)
wp1.Curtain = True
wp1.ItemTextColor = Colors.White
wp1.Atmospheric = True
wp1.ItemAlign = 0 '0 = center, 1 = left, 2 = right
wp1.ItemTextSize = 40
wp1.SelectedItemPosition = 3 'it will start at Thursday
wp1.SelectedItemTextColor = Colors.Magenta
wp1.VisibleItemCount = 4
wp1.SameWidth = True 'not sure what this is supposed to do
mydaylist.Initialize
mydaylist.AddAll(Array As String("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"))
wp1.Data = mydaylist
wp2.Curved = True
wp2.Cyclic = True
wp2.CurtainColor = Colors.ARGB(100, 255, 0, 0)
wp2.Curtain = True
wp2.ItemTextColor = Colors.Yellow
wp2.Atmospheric = True
wp2.ItemAlign = 0 '0 = center, 1 = left, 2 = right
wp2.ItemTextSize = 40
wp2.SelectedItemPosition = 7 'it will start at August
wp2.SelectedItemTextColor = Colors.Cyan
wp2.VisibleItemCount = 6
wp2.SameWidth = True 'not sure what this is supposed to do
mymonthlist.Initialize
mymonthlist.AddAll(Array As String("January", "February", "March", "April", "May", "June", "July", _
"August", "September", "October", "November", "December"))
wp2.Data = mymonthlist
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub wp1_item_selected(position As Int)
Log("wp1 position = " & position & " value = " & mydaylist.Get(position))
End Sub
Sub wp2_item_selected(position As Int)
Log("wp2 position = " & position & " value = " & mymonthlist.Get(position))
End Sub