Add branded app title to main screen
This commit is contained in:
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -53,6 +53,7 @@ Sub Globals
|
|||||||
Private BtnHelpOpen As Button
|
Private BtnHelpOpen As Button
|
||||||
Private BtnHelpClose As Button
|
Private BtnHelpClose As Button
|
||||||
Private BtnBackground As Label
|
Private BtnBackground As Label
|
||||||
|
Private lblAppName As Label
|
||||||
Private lblElapsedTime As Label
|
Private lblElapsedTime As Label
|
||||||
Private lblAutoStatus As Label
|
Private lblAutoStatus As Label
|
||||||
Private pnlClock As Panel
|
Private pnlClock As Panel
|
||||||
@@ -117,6 +118,7 @@ Sub Activity_Create(FirstTime As Boolean)
|
|||||||
CreateConfigPage
|
CreateConfigPage
|
||||||
CreateHelpPage
|
CreateHelpPage
|
||||||
CreateBackgroundButton
|
CreateBackgroundButton
|
||||||
|
CreateAppNameLabel
|
||||||
CreateAutoStatusLabel
|
CreateAutoStatusLabel
|
||||||
LayoutMainButtons
|
LayoutMainButtons
|
||||||
LoadAutoConfig
|
LoadAutoConfig
|
||||||
@@ -207,6 +209,16 @@ Private Sub CreateBackgroundButton
|
|||||||
Activity.AddView(BtnBackground, BtnPause.Left, BtnPause.Top, BtnPause.Width, BtnPause.Height)
|
Activity.AddView(BtnBackground, BtnPause.Left, BtnPause.Top, BtnPause.Width, BtnPause.Height)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CreateAppNameLabel
|
||||||
|
lblAppName.Initialize("")
|
||||||
|
lblAppName.Text = Localization.T("app_title")
|
||||||
|
lblAppName.TextColor = Colors.Black
|
||||||
|
lblAppName.TextSize = 22
|
||||||
|
lblAppName.Typeface = Typeface.CreateNew(Typeface.SANS_SERIF, Typeface.STYLE_BOLD_ITALIC)
|
||||||
|
lblAppName.Gravity = Gravity.CENTER
|
||||||
|
Activity.AddView(lblAppName, 0, 0, 10dip, 10dip)
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub LayoutMainButtons
|
Private Sub LayoutMainButtons
|
||||||
Dim margin As Int = 8dip
|
Dim margin As Int = 8dip
|
||||||
Dim gap As Int = 8dip
|
Dim gap As Int = 8dip
|
||||||
@@ -233,6 +245,11 @@ Private Sub LayoutMainButtons
|
|||||||
BtnBackground.SetLayout(margin, row2Top, smallButtonWidth, buttonHeight)
|
BtnBackground.SetLayout(margin, row2Top, smallButtonWidth, buttonHeight)
|
||||||
BtnStats.SetLayout(margin + smallButtonWidth + gap, row2Top, smallButtonWidth, buttonHeight)
|
BtnStats.SetLayout(margin + smallButtonWidth + gap, row2Top, smallButtonWidth, buttonHeight)
|
||||||
BtnConfig.SetLayout(margin + (2 * (smallButtonWidth + gap)), row2Top, smallButtonWidth, buttonHeight)
|
BtnConfig.SetLayout(margin + (2 * (smallButtonWidth + gap)), row2Top, smallButtonWidth, buttonHeight)
|
||||||
|
If lblAppName.IsInitialized Then
|
||||||
|
Dim titleTop As Int = pnlClock.Top + pnlClock.Height + 4dip
|
||||||
|
Dim titleHeight As Int = Max(28dip, row1Top - titleTop - 4dip)
|
||||||
|
lblAppName.SetLayout(0, titleTop, Activity.Width, titleHeight)
|
||||||
|
End If
|
||||||
If lblElapsedTime.IsInitialized Then lblElapsedTime.SetLayout(0, labelTop, Activity.Width * 0.58, 28dip)
|
If lblElapsedTime.IsInitialized Then lblElapsedTime.SetLayout(0, labelTop, Activity.Width * 0.58, 28dip)
|
||||||
If lblAutoStatus.IsInitialized Then lblAutoStatus.SetLayout(Activity.Width * 0.58, labelTop, Activity.Width * 0.42, 28dip)
|
If lblAutoStatus.IsInitialized Then lblAutoStatus.SetLayout(Activity.Width * 0.58, labelTop, Activity.Width * 0.42, 28dip)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
Reference in New Issue
Block a user