B4A Library CircularSeekBar

Discussion in 'Additional libraries, classes and official updates' started by Johan Schoeman, Jul 5, 2015.

  1. Johan Schoeman

    Johan Schoeman Expert Licensed User

    The attached project wraps this Github project. Library files (JAR & XML) are in the /files folder of the B4A project. Copy them to your additional libraries folder. Also posting the Java source code.

    The left hand view demonstrates most of the properties. The right hand view is based on the default properties.

    Thanks teacher...;)

    pic1.png


    CircularSeekBar
    Version:
    1
    • CircularSeekBar
      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
      • CircleColor As Int
        Gets the circle color.
      • CircleFillColor As Int
        Gets the circle fill color.
      • CircleProgressColor As Int
        Gets the circle progress color.
      • Color As Int [write only]
      • Enabled As Boolean
      • Height As Int
      • Left As Int
      • Max As Int [write only]
        Set the max of the CircularSeekBar.
        If the new max is less than the current progress, then the progress will be set to zero.
        If the progress is changed as a result, then any listener will receive a onProgressChanged event.
      • PointerAlpha As Int
        Gets the pointer alpha value.
      • PointerAlphaOnTouch As Int
        Gets the pointer alpha value when touched.
      • PointerColor As Int
        Gets the pointer color.
      • PointerHaloColor As Int
        Gets the pointer halo color.
      • Progress As Int
        Get the progress of the CircularSeekBar.
      • Tag As Object
      • Top As Int
      • Visible As Boolean
      • Width As Int
     

    Attached Files:

  2. DonManfred

    DonManfred Expert Licensed User

    Time for an Overview Thread for your Libs :D
     
    Johan Schoeman likes this.
  3. Johan Schoeman

    Johan Schoeman Expert Licensed User

    Maybe sometime in future Teacher...lots to learn...:)
     
  4. tamayo461

    tamayo461 Member Licensed User

    hello, I can use this lib as a volume control?
     
  5. Johan Schoeman

    Johan Schoeman Expert Licensed User

  6. Taha

    Taha Member Licensed User

    Couldn't get this event to work.

    Without Changed or Touch events this control is useless IMHO.
     
    Last edited: Nov 7, 2015
  7. Johan Schoeman

    Johan Schoeman Expert Licensed User

    Use the lib files attached and add the following code to the B4A project:

    Code:
    Sub csb1_value_changed
      
        
    Log("csb1 value = " & csb1.Progress)
      
    End Sub

    Sub csb2_value_changed
      
        
    Log("csb2 value = " & csb2.Progress)
      
    End Sub
    Amend the initialize lines of code to:
    Code:
    csb1.Initialize("csb1")
    csb2.Initialize(
    "csb2")


    The xxxx_value_changed event will be raised regardless of the progress being set via B4A code or via touch.
     

    Attached Files:

    Taha likes this.
  8. Taha

    Taha Member Licensed User

    Hi, Johan! Many thanks! Great control!
     
    Johan Schoeman likes this.
Loading...