B4A Library [B4X] [XUI] AS NumberProgressBar

Hello,
i spend a lot of time in creating views, like this and to create a high quality view cost a lot of time. If you want to support me and further views, then you can do it here by Paypal. :)

Features
  • cross-platform compatible
  • Prefix and Suffix
  • customizable
  • Increment and Decrement Progress
  • easy to use
Bildschirmfoto 2020-05-17 um 01.05.09.png
ezgif.com-crop.gif


ASNumberProgressBar
Author: Alexander Stolte
Version: 1.00

  • ASNumberProgressBar
    • Functions:
      • Class_Globals As String
      • DecrementProgressBy (by As Int) As String
      • DesignerCreateView (Base As Object, Lbl As Label, Props As Map) As String
        Base type must be Object
      • getBarMax As Int
      • getCurrentProgress As Int
      • getPrefix As String
      • getReachedColor As Int
      • getReachedHeight As Float
      • getSuffix As String
      • getTextBackgroundColor As Int
      • getTextColor As Int
      • getTextFont As B4XFont
      • getTextOffset As Int
      • getUnreachedColor As Int
      • getUnreachedHeight As Float
      • IncrementProgressBy (by As Int) As String
      • Initialize (Callback As Object, EventName As String) As String
      • IsInitialized As Boolean
        Tests whether the object has been initialized.
      • setBarMax (bar_max As Int) As String
      • setCurrentProgress (current_progress As Int) As String
      • setPrefix (prefix As String) As String
      • setReachedColor (color As Int) As String
      • setReachedHeight (height As Float) As String
      • setSuffix (suffix As String) As String
      • setTextBackgroundColor (color As Int) As String
      • setTextColor (color As Int) As String
      • setTextFont (fnt As B4XFont) As String
      • setTextOffset (offset As Int) As String
      • setUnreachedColor (color As Int) As String
      • setUnreachedHeight (height As Float) As String
    • Properties:
      • BarMax As Int
      • CurrentProgress As Int
      • Prefix As String
      • ReachedColor As Int
      • ReachedHeight As Float
      • Suffix As String
      • TextBackgroundColor As Int
      • TextColor As Int
      • TextFont As B4XFont
      • TextOffset As Int
      • UnreachedColor As Int
      • UnreachedHeight As Float
Changelog
  • 1.00
    • Release
Have Fun :)
 

Attachments

  • B4A Example.zip
    3.7 KB · Views: 268
  • B4I Example.zip
    3 KB · Views: 155
  • B4J Example.zip
    2.5 KB · Views: 175
  • ASNumberProgressBar.b4xlib
    1.9 KB · Views: 272

Metalika

Member
hi @Alexander Stolte

thank you for share this awesome lib.

i want to change font :
B4X:
Sub Process_Globals
Private Xui As XUI
Private FontXui As B4XFont=Xui.CreateFont(Typeface.LoadFromAssets("my.ttf"),15)
end sub
.
.
.
V_ProgressBar.TextFont(FontXui)

BUT NOT WORK. And B4a give Me Error in syntax.

Wher is my Wrong?

Thank u.
 

Metalika

Member
hi how i can use this lib with code :(your example made in designer)
what is callback object ?
Initialize (Callback As Object, EventName As String) As String
i use this but it not work

Dim aa As Object
ASNumberProgressBar3.Initialize(aa,"ASNumberProgressBar3")
ASNumberProgressBar3.BarMax=100
ASNumberProgressBar3.CurrentProgress=50
Activity.AddView(aa,0,50%y,100%x,5%y)

@Alexander Stolte
 
Last edited:

73Challenger

Member
Licensed User
@Alexander Stolte - Thank you for the number progress bars. Donation sent via PayPal.
I had to write some significant code to customize them, but everything was in your library that I needed. They work great!
Sometime soon I'll post this in "Share your creations" and credit your work. Thanks again.

Color change to highlight "Hot, Neutral, Cold"
1634509932481.png
1634510003470.png
1634510071740.png


Scaling Change. As the count grows, I reset BarMax to keep the bars proportioned and within the view.
1634510511421.png
1634511112821.png
1634510563637.png


I only had one minor issue I haven't been able to resolve (circled in screenshot below). In some cases when I reset BarMax I get a small overlap. Not a big deal, it may be an issue with the way I increment BarMax, I'll try to figure it out someday.

1634510935014.png


Thanks again!
 

Attachments

  • 1634510060473.png
    1634510060473.png
    79 KB · Views: 24
Top