#Region Project Attributes
#ApplicationLabel: b4aSectorProgressView
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: portrait
#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.
Dim t 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 spv1 As SectorProgressView
Dim cntr As Int = 0
Private Label1 As Label
Private cfrpv1 As ColorfulRingProgressView
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")
t.Initialize("t", 100)
spv1.BgColor = Colors.White
spv1.FgColor = Colors.Red
spv1.StartAngle = 0
spv1.Percent = cntr
Label1.Text = "" & cntr
cfrpv1.BgColor = Colors.White
cfrpv1.StartAngle = 0
cfrpv1.StrokeWidth = 40
cfrpv1.FgColorStart = Colors.Red
cfrpv1.FgColorEnd = Colors.Yellow
cfrpv1.Percent = cntr
End Sub
Sub Activity_Resume
t.Enabled = True
End Sub
Sub Activity_Pause (UserClosed As Boolean)
t.Enabled = False
End Sub
Sub t_tick
cntr = cntr + 1
If cntr < 101 Then
spv1.Percent = cntr
cfrpv1.Percent = cntr
Label1.Text = "" & cntr
Else
cntr = 0
spv1.Percent = cntr
cfrpv1.Percent = cntr
Label1.Text = "" & cntr
End If
End Sub