B4A Library PercentageChartView

Enjoy this https://github.com/RamiJ3mli/PercentageChartView in B4A


Author: SMM
Version: 0.01
  • PercentageChartView
    • Events:
      • _onprogresschanged (progress As Float)
    • Functions:
      • BringToFront
      • Initialize (EventName As String)
      • Invalidate
      • Invalidate2 (arg0 As android.graphics.Rect)
      • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
      • isAdaptiveBackgroundBarEnabled As Boolean
      • isAdaptiveBackgroundEnabled As Boolean
      • isAdaptiveTextEnabled As Boolean
      • isDrawBackgroundBarEnabled As Boolean
      • isDrawBackgroundEnabled As Boolean
      • IsInitialized As Boolean
      • RemoveView
      • RequestFocus As Boolean
      • SendToBack
      • setAdaptiveBackground (ratio As Float, adaptiveMode As Int)
      • setAdaptiveBackgroundBar (ratio As Float, adaptiveMode As Int)
      • setAdaptiveText (ratio As Float, adaptiveMode As Int)
      • SetBackgroundImage (arg0 As android.graphics.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)
      • setProgress (progress As Float, animate As Boolean)
        Sets a new progress value. Passing true in animate will result in an animated progress update.
        progress: New progress float value to set.
        animate: Animation boolean value to set whether to animate progress change or not.
      • setTextShadow (shadowColor As Int, shadowRadius As Float, shadowDistX As Float, shadowDistY As Float)
      • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
    • Properties:
      • AdaptiveBackgroundBarMode As Int [read only]
      • AdaptiveBackgroundBarRatio As Float [read only]
      • AdaptiveBackgroundMode As Int [read only]
      • AdaptiveBackgroundRatio As Float [read only]
      • AdaptiveBgBarEnabled As Boolean [write only]
      • AdaptiveBgEnabled As Boolean [write only]
      • AdaptiveTextEnabled As Boolean [write only]
      • AdaptiveTextMode As Int [read only]
      • AdaptiveTextRatio As Float [read only]
      • AnimationDuration As Int
      • AnimationInterpolator As android.animation.TimeInterpolator
      • Background As android.graphics.drawable.Drawable
      • BackgroundBarColor As Int
      • BackgroundBarThickness As Float
      • BackgroundColor As Int
      • BackgroundOffset As Float
      • Color As Int [write only]
      • DrawBackgroundBarEnabled As Boolean [write only]
      • DrawBackgroundEnabled As Boolean [write only]
      • Enabled As Boolean
      • Height As Int
      • Left As Int
      • Orientation As Int
      • Padding As Int()
      • Parent As Object [read only]
      • Progress As Float [read only]
      • ProgressBarStyle As Int
      • ProgressBarThickness As Float
      • ProgressColor As Int
      • StartAngle As Float
      • Tag As Object
      • TextColor As Int
      • TextShadowColor As Int [read only]
      • TextShadowDistX As Float [read only]
      • TextShadowDistY As Float [read only]
      • TextShadowRadius As Float [read only]
      • TextSize As Float
      • TextStyle As Int
      • Top As Int
      • Typeface As Typeface
      • Visible As Boolean
      • Width As Int

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
    Dim timer 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.

    Dim pcv As PercentageChartView
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    pcv.BackgroundColor= Colors.Gray
    pcv.TextColor= Colors.Yellow
    pcv.ProgressColor= Colors.Green
End Sub
Sub timer_tick
    If pcv.Progress< 360 Then
    End If
End Sub
Sub pcv_onprogresschanged(progr As Float)
End Sub


  • percentagechartview-0.2.0.zip
    49 KB · Views: 247


Licensed User
Longtime User
Thanks somed3v3loper.

I have attached screenshot from the site, to get the idea of the library.


I do not know if it is permitted, so made a smaller image.