#Region Project Attributes
#ApplicationLabel: b4aSingleDateAndTimePicker
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: portrait
#CanInstallToExternalStorage: False
#End Region
#AdditionalRes: ..\LibRes
#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 sdtp1 As SingleDateAndTimePicker
Private b1 As Button
Dim monthlist As List
Dim daylist As List
Private Label1 As Label
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")
monthlist.Initialize2(Array As String("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"))
daylist.Initialize2(Array As String("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", " Friday", " Saturday"))
sdtp1.DayCurtain = True
sdtp1.DayCurtainColor = Colors.ARGB(100, 0, 255, 0)
sdtp1.DayCurved = True
sdtp1.DayIndicator = True
sdtp1.DayIndicatorColor = Colors.Black
sdtp1.DayItemTextColor = Colors.Red
sdtp1.DaySelectedItemTextColor = Colors.Blue
sdtp1.DayItemAlign = sdtp1.ALIGN_LEFT
sdtp1.DayIndicatorSize = 5 'the line thickness of the indicator
sdtp1.DayVisibleItemCount = 7
sdtp1.DayAtmospheric = True
sdtp1.DayCyclic = True
sdtp1.HourCurtain = True
sdtp1.HourCurtainColor = Colors.ARGB(100, 255, 0, 0)
sdtp1.HourCurved = True
sdtp1.HourIndicator = True
sdtp1.HourIndicatorColor = Colors.Magenta
sdtp1.HourItemTextColor = Colors.Blue
sdtp1.HourSelectedItemTextColor = Colors.Cyan
sdtp1.HourItemAlign = sdtp1.ALIGN_LEFT
sdtp1.HourIndicatorSize = 5 'the line thickness of the indicator
sdtp1.HourVisibleItemCount = 7
sdtp1.HourAtmospheric = True
sdtp1.HourCyclic = True
sdtp1.MinuteCurtain = False
sdtp1.MinuteCurtainColor = Colors.ARGB(100, 0, 0, 175)
sdtp1.MinuteCurved = True
sdtp1.MinuteIndicator = True
sdtp1.MinuteIndicatorColor = Colors.Blue
sdtp1.MinuteItemTextColor = Colors.Cyan
sdtp1.MinuteSelectedItemTextColor = Colors.Magenta
sdtp1.MinuteItemAlign = sdtp1.ALIGN_LEFT
sdtp1.MinuteIndicatorSize = 5 'the line thickness of the indicator
sdtp1.MinuteVisibleItemCount = 7
sdtp1.MinuteAtmospheric = True
sdtp1.MinuteCyclic = True
sdtp1.ShowToastMessage = False
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub sdtp1_date_time_changed(year As Int, month As Int, dayOfMonth As Int, dayOfWeek As Int, hour As Int, minute As Int, stringDateTime As String)
Log("YEAR = " & year)
Log("MONTH = " & monthlist.Get(month))
Log("DAY OF MONTH = " & dayOfMonth)
Log("DAY OF WEEK = " & daylist.Get(dayOfWeek))
Log("HOUR = " & hour)
Log("MINUTE = " & minute)
Log("STRING DATE AND TIME = " & stringDateTime)
End Sub
Sub b1_Click
Log(sdtp1.myyear)
Log(monthlist.Get(sdtp1.mymonth))
Log(sdtp1.mydayofmonth)
Log(daylist.Get(sdtp1.mydayofweek))
Log(sdtp1.myhour)
Log(sdtp1.myminute)
Log(sdtp1.mydate)
End Sub