#Region Project Attributes
#ApplicationLabel: CharacterPickerView
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: landscape
#CanInstallToExternalStorage: False
#End Region
#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 cpv1 As CharacterPickerView
Private cpv2 As CharacterPickerView
Private cpv3 As CharacterPickerView
Dim month(12) As String
Dim day(31) As String
Dim year(23) As String
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")
Dim lst1 As List
lst1.Initialize
month = Array As String("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")
lst1.AddAll(month)
cpv1.Picker = lst1
cpv1.Cyclic = True
cpv1.HorizontalLineColor = Colors.Magenta
cpv1.OutsideTextColor = Colors.Blue
cpv1.CentreTextColor = Colors.Red
cpv1.Index = 4
Dim lst2 As List
lst2.Initialize
day = Array As String("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31")
lst2.AddAll(day)
cpv2.Picker = lst2
cpv2.Cyclic = True
cpv2.HorizontalLineColor = Colors.Black
cpv2.OutsideTextColor = Colors.Red
cpv2.CentreTextColor = Colors.Blue
cpv2.Index = 4
Dim lst3 As List
lst3.Initialize
year = Array As String("1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021")
lst3.AddAll(year)
cpv3.Picker = lst3
cpv3.Cyclic = True
cpv3.HorizontalLineColor = Colors.Green
cpv3.OutsideTextColor = Colors.Black
cpv3.CentreTextColor = Colors.Cyan
cpv3.Index = 17
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub cpv1_value_changed(cpv1Value As Int)
Log("cpv1Value = " & cpv1Value)
Log("cpv1Get = " & cpv1.SelectedIndex)
Log("Month = " & month(cpv1Value))
End Sub
Sub cpv2_value_changed(cpv2Value As Int)
Log("cpv2Value = " & cpv2Value)
Log("cpv2Get = " & cpv2.SelectedIndex)
Log("Day = " & day(cpv2Value))
End Sub
Sub cpv3_value_changed(cpv3Value As Int)
Log("cpv3Value = " & cpv3Value)
Log("cpv3Get = " & cpv3.SelectedIndex)
Log("Year = " & year(cpv3Value))
End Sub