B4A Library Croller

A wrap for this Github project. Attached the B4A sample project, the B4A library files, and zipped folder LibRes. Extract LibRes.Zip and then copy the folder and its contents to be on the same folder level as that of the /Files and /Objects folders of the B4A project.

1.gif


Sample code:
B4X:
#Region  Project Attributes
    #ApplicationLabel: b4aCroller
    #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 cr1 As Croller
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")
    cr1.LabelColor = Colors.White
    cr1.LabelSize = 35
    cr1.BackCircleColor = Colors.Magenta
    cr1.IndicatorWidth = 12
    cr1.IndicatorColor = Colors.Blue
    cr1.MainCircleColor = Colors.Yellow
    cr1.ProgressSecondaryColor = Colors.White
    cr1.ProgressPrimaryColor = Colors.Cyan
    cr1.ProgressSecondaryCircleSize = 7
    cr1.SweepAngle = 330
    cr1.Maximum = 50
    cr1.IsContinuous = False
    cr1.Progress = 25
    cr1.Label = "" & cr1.CrollerProgress
    cr1.StartOffset = 30
    cr1.ProgressPrimaryCircleSize = 9


End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub cr1_value_changed(value As Int)
   
    cr1.Label = "" & value
   
End Sub

Library:
Croller
Author:
Github: Harjot Singh Oberai, Wrapped by: Johan Schoeman
Version: 1
  • Croller
    Events:
    • value_changed (value As Int)
    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:
    • BackCircleColor As Int [write only]
    • Background As Drawable
    • Color As Int [write only]
    • CrollerProgress As Int [read only]
    • Enabled As Boolean
    • Height As Int
    • IndicatorColor As Int [write only]
    • IndicatorWidth As Float [write only]
    • IsContinuous As Boolean [write only]
    • Label As String [write only]
    • LabelColor As Int [write only]
    • LabelSize As Int [write only]
    • Left As Int
    • MainCircleColor As Int [write only]
    • Maximum As Int [write only]
    • Parent As Object [read only]
    • Progress As Int [write only]
    • ProgressPrimaryCircleSize As Float [write only]
    • ProgressPrimaryColor As Int [write only]
    • ProgressSecondaryCircleSize As Float [write only]
    • ProgressSecondaryColor As Int [write only]
    • StartOffset As Int [write only]
    • SweepAngle As Int [write only]
    • Tag As Object
    • Top As Int
    • Visible As Boolean
    • Width As Int
 

Attachments

  • LibRes.zip
    1.1 KB · Views: 250
  • CrollerLibFiles.zip
    11.9 KB · Views: 256
  • b4aCroller.zip
    7.9 KB · Views: 253
Top