B4A Library SpinKitView - Eleven Indeterminate Progress Indicators

It wraps this Github project (11 indeterminate progress indicators). Posting the following:
1. B4A library files - copy them to your additional library folder
2. B4A project for demonstration purposes
3. The Java code - change it to your liking

Take note of the files in the /Objects/res/values folder of the B4A project. Make sure they are there when you start a new B4A project or after you have downloaded the project (and before you run it for the first time). The files in this folder should be set to READ ONLY

1.png


2.png


Sample Code:

B4X:
#Region  Project Attributes
    #ApplicationLabel: SpinKitView
    #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.

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 skv1 As SpinKitView
    Private skv2 As SpinKitView
    Private skv3 As SpinKitView
    Private skv4 As SpinKitView
    Private skv5 As SpinKitView
    Private skv6 As SpinKitView
    Private skv7 As SpinKitView
    Private skv8 As SpinKitView
    Private skv9 As SpinKitView
    Private skv10 As SpinKitView
    Private skv11 As SpinKitView
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")
   
    skv1.Visible = True
    skv1.SpinKitColor = Colors.blue
    skv1.SpinKitType = skv1.CHASING_DOTS
    skv1.goForIt
   
    skv2.Visible = True
    skv2.SpinKitColor = Colors.Yellow
    skv2.SpinKitType = skv2.CIRCLE
    skv2.goForIt   
   
    skv3.Visible = True
    skv3.SpinKitColor = Colors.Green
    skv3.SpinKitType = skv3.CUBE_GRID
    skv3.goForIt       
   
    skv4.Visible = True
    skv4.SpinKitColor = Colors.Magenta
    skv4.SpinKitType = skv4.DOUBLE_BOUNCE
    skv4.goForIt       
   
    skv5.Visible = True
    skv5.SpinKitColor = Colors.Cyan
    skv5.SpinKitType = skv5.FADING_CIRCLE
    skv5.goForIt       
   
    skv6.Visible = True
    skv6.SpinKitColor = Colors.Red
    skv6.SpinKitType = skv6.FOLDING_CUBE
    skv6.goForIt           
   
    skv7.Visible = True
    skv7.SpinKitColor = Colors.Blue
    skv7.SpinKitType = skv7.PULSE
    skv7.goForIt   
   
    skv8.Visible = True
    skv8.SpinKitColor = Colors.Yellow
    skv8.SpinKitType = skv8.ROTATING_PLANE
    skv8.goForIt       
   
    skv9.Visible = True
    skv9.SpinKitColor = Colors.Green
    skv9.SpinKitType = skv9.THREE_BOUNCE
    skv9.goForIt       
   
    skv10.Visible = True
    skv10.SpinKitColor = Colors.Magenta
    skv10.SpinKitType = skv10.WANDERING_CUBES
    skv10.goForIt
   
    skv11.Visible = True
    skv11.SpinKitColor = Colors.Cyan
    skv11.SpinKitType = skv11.WAVE
    skv11.goForIt                       

End Sub

Sub Activity_Resume
   
   

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Library as it stands at present:

SpinKitView
Author:
Github: yangbingqaing, Wrapped by: Johan Schoeman
Version: 1
  • SpinKitView
    Fields:
    • CHASING_DOTS As Int
    • CIRCLE As Int
    • CUBE_GRID As Int
    • DOUBLE_BOUNCE As Int
    • FADING_CIRCLE As Int
    • FOLDING_CUBE As Int
    • PULSE As Int
    • ROTATING_PLANE As Int
    • THREE_BOUNCE As Int
    • WANDERING_CUBES As Int
    • WAVE As Int
    • ba As BA
    Methods:
    • BringToFront
    • DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
    • Initialize (EventName As String)
    • Invalidate
    • Invalidate2 (arg0 As Rect)
    • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • IsInitialized As Boolean
    • RemoveView
    • RequestFocus As Boolean
    • SendToBack
    • SetBackgroundImage (arg0 As Bitmap)
    • SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
    • SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
    • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
    • goForIt
    Properties:
    • Background As Drawable
    • Color As Int [write only]
    • Enabled As Boolean
    • Height As Int
    • Left As Int
    • Parent As Object [read only]
    • SpinKitColor As Int [write only]
    • SpinKitType As Int [write only]
    • Tag As Object
    • Top As Int
    • Visible As Boolean
    • Width As Int
 

Attachments

  • TheJavaCode.zip
    86 KB · Views: 346
  • b4aSpinKitView.zip
    9.5 KB · Views: 406
  • SpinKitViewLibFiles.zip
    42 KB · Views: 425

rboeck

Well-Known Member
Licensed User
Longtime User
My first thought was: why do we need so much different progress indicators? We dont use windows...
 

Johan Schoeman

Expert
Licensed User
Longtime User
My first thought was: why do we need so much different progress indicators? We dont use windows...
You don't have to use them...maybe someone else does.
 
Last edited:

rboeck

Well-Known Member
Licensed User
Longtime User
@Johan Schoeman: You missunderstood me - i think, android has a much better concept than windows, so that not so much progress indicators are visible. It should be a funny fact about windows waiting and not about the progress indicators. I am a fan of your work and usually try all your libs.
 
Top