Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Private imgImagem As B4XImageView
Private lblFrase As B4XView
Private pnlFundo As B4XView
End Sub
Public Sub Initialize
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
Log(DateTime.Time(DateTime.now) & "B4XPage_Created")
Root = Root1
Root.LoadLayout("MainPage")
End Sub
Sub B4XPage_Appear
Log(DateTime.Time(DateTime.now) & "B4XPage_Appear")
carregarInformacoes
End Sub
Sub carregarInformacoes
Dim horas As Int = DateTime.GetHour(DateTime.Now)
Select horas
Case 6, 7, 8, 9, 10, 11
lblFrase.Text = "Bom dia"
imgImagem.Load(File.DirAssets, "dia.jpg")
Case 12, 13, 14, 15, 16, 17, 18
lblFrase.Text = "Boa tarde"
imgImagem.Load(File.DirAssets, "tarde.jpg")
Case Else
lblFrase.Text = "Boa noite"
imgImagem.Load(File.DirAssets, "noite.jpg")
End Select
End Sub