B4A Library UberProgressView (to be completed by those that want to do a wrapper)

It wraps just about nothing of this Github project. I am leaving this as incomplete on purpose for those that want to go through the exercise of doing a wrapper. You would need to add code to the original Github project and the wrapper (getters / setters) to allow for different colors, different radii, etc.

Posting:
1. the B4A code that contains just about nothing other than the customview in the Designer
2. The B4A library files as it is at present - the wrapper contains the bare essentials for the progressview to start in the B4A project.
3. The Java Code

Enjoy!


UberProgressViewDemo.gif



1.png


B4A code as it is at present (very very little to get the above pic):
B4X:
#Region  Project Attributes
    #ApplicationLabel: UberProgressView
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #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 upv1 As UberProgressView
 
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")

End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Library as it is (to be completed by those that want to take it on):

UberProgressView
Author:
Github: Ishan Khanna, Wrapped by: Johan Schoeman
Version: 1
  • UberProgressView
    Fields:
    • 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)
    Properties:
    • Background As Drawable
    • Color As Int [write only]
    • Enabled As Boolean
    • Height As Int
    • Left As Int
    • Parent As Object [read only]
    • Tag As Object
    • Top As Int
    • Visible As Boolean
    • Width As Int
 

Attachments

  • b4aUberProgressView.zip
    7.7 KB · Views: 193
  • UberProgressViewIncompleteLibFiles.zip
    7.5 KB · Views: 189
  • TheJavaCode.zip
    5.4 KB · Views: 168
Last edited:
Top