#Region Activity Attributes
#FullScreen: True
#IncludeTitle: False
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim timer1 As Timer
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 dateLb As Label
Private timeLb As Label
Private Panel1 As Panel
Private infoBtn As ImageView
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("homescreen")
DateTime.DateFormat = "EEE, MMM d, yyyy"
Dim d As Long=DateTime.Now
Dim ds As String=$"$DateTime{d}"$
Dim sd1() As String=Regex.Split(" ", ds)
dateLb.Text=sd1(0) & " " & sd1(1) & " " & sd1(2) & " " & sd1(3) & " " & sd1(4)
infoBtn.BringToFront
timer1.Initialize("timer1",1000)
timer1.Enabled=True
End Sub
Sub timer1_Tick
DateTime.DateFormat = "EEE, MMM d, yyyy"
Dim d As Long=DateTime.Now
Dim ds As String=$"$DateTime{d}"$
Dim sd2() As String=Regex.Split(" ", ds)
timeLb.Text=sd2(5)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub infoBtn_Click
If Panel1.Visible=False Then
Panel1.Enabled=True
Panel1.Visible=True
infoBtn.BringToFront
Else
Panel1.Enabled=False
Panel1.Visible=False
infoBtn.BringToFront
End If
End Sub
Sub waterBtn_Click
StartActivity(water)
End Sub
Sub Button1_Click
StartActivity(Main)
End Sub