#Region Project Attributes
#ApplicationLabel: ProgressWheel
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: landscape
#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 pw1, pw2 As ProgressWheel
Dim brlng As Int = 15
Private pw3 As ProgressWheel
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",50)
pw1.Initialize("")
pw2.Initialize("")
pw3.Initialize("")
Activity.AddView(pw1, 10%x, 50%y - 10%x, 20%x, 20%x)
Activity.AddView(pw2, 40%x, 50%y - 10%x, 20%x, 20%x)
Activity.AddView(pw3, 70%x, 50%y - 10%x, 20%x, 20%x)
pw1.CircleColor = Colors.ARGB(100,0,0,255)
pw1.BarLength = brlng
pw1.RimColor = Colors.Yellow
pw1.RimWidth = 20 'limit this to 20
pw1.BarColor = Colors.Red
pw1.BarWidth = 20
pw1.Left = 10%x
pw1.Width = 20%x
pw1.Height = 20%x
pw1.Top = 50%y - (pw1.Height/2)
pw1.ContourColor = Colors.Green 'make the contour around the inner and outer of the blue rim grey
pw1.ContourSize = 5 'set the size of the contour inner and outer around the blue rim
pw1.SpinSpeed = 5 'the bigger the number the faster it goes around
pw1.Text = "B4A"
pw1.TextColor = Colors.LightGray
pw1.TextSize = 20
pw1.PaddingBottom = 30
pw1.PaddingLeft = 10
pw1.PaddingTop = 30
pw1.PaddingRight = 10
Dim mycolors(8) As Int = Array As Int (0xFF2E9121, 0xFF2E9121, 0xFF2E9121, 0xFF2E9121, 0xFF2E9121, 0xFF2E9121, 0xFFFFFFFF, 0xFFFFFFFF)
' pw1.RimShader = mycolors 'does funny stuff to the rim - read up on android.graphics.Shader
pw1.spin
pw3.CircleColor = Colors.ARGB(100,200,200,255)
pw3.BarLength = brlng
pw3.RimColor = Colors.Yellow
pw3.RimWidth = 20 'limit this to 20
pw3.BarColor = Colors.White
pw3.BarWidth = 10
pw3.Left = 40%x
pw3.Width = 20%x
pw3.Height = 20%x
pw3.Top = 50%y - (pw3.Height/2)
pw3.ContourColor = Colors.Red 'make the contour around the inner and outer of the blue rim grey
pw3.ContourSize = 5 'set the size of the contour inner and outer around the blue rim
pw3.SpinSpeed = 5 'the bigger the number the faster it goes around
pw3.Text = "B4A"
pw3.TextColor = Colors.Green
pw3.TextSize = 30
pw3.PaddingBottom = 20
pw3.PaddingLeft = 20
pw3.PaddingTop = 20
pw3.PaddingRight = 20
Dim mycolors(8) As Int = Array As Int (0xFF2E9121, 0xFF2E9121, 0xFF2E9121, 0xFF2E9121, 0xFF2E9121, 0xFF2E9121, 0xFF0000FF, 0xFF0000FF)
pw3.RimShader = mycolors 'does funny stuff to the rim - read up on android.graphics.Shader
pw3.Progress = 90
pw3.spin
pw2.CircleColor = Colors.Black
pw2.BarLength = brlng
pw2.RimColor = Colors.Black
pw2.RimWidth = 20 'limit this to 20
pw2.BarColor = Colors.White
pw2.BarWidth = 5
pw2.Left = 70%x
pw2.Width = 20%x
pw2.Height = 20%x
pw2.Top = 50%y - (pw2.Height/2)
pw2.ContourColor = Colors.Blue 'make the contour around the inner and outer of the blue rim grey
pw2.ContourSize = 5 'set the size of the contour inner and outer around the blue rim
pw2.SpinSpeed = 5 'the bigger the number the faster it goes around
pw2.Text = "B4A"
pw2.TextColor = Colors.Red
pw2.TextSize = 15
pw2.PaddingBottom = 10
pw2.PaddingLeft = 30
pw2.PaddingTop = 10
pw2.PaddingRight = 30
Dim mycolors(8) As Int = Array As Int (0xFF2E9121, 0xFF2E9121, 0xFF2E9121, 0xFF2E9121, 0xFF2E9121, 0xFF2E9121, 0xFFFFFF00, 0xFFFF0000)
' pw2.RimShader = mycolors 'does funny stuff to the rim - read up on android.graphics.Shader
pw2.Progress = 90
pw2.spin
' OTHER METHODS THAT YOU CAN TEST AND USE:
' pw1.stopSpinning
' pw1.Color = Colors.Gray
' pw1.incrementProgress
' pw1.Progress
' pw1.DelayMillis = 1000
' pw1.resetCount
End Sub
Sub Activity_Resume
t.Enabled = True
End Sub
Sub Activity_Pause (UserClosed As Boolean)
t.Enabled = False
End Sub
Sub t_tick
brlng = brlng + 10
If brlng = 345 Then brlng = 15
pw1.BarLength = brlng
pw2.BarLength = brlng
pw3.BarLength = brlng
End Sub