B4A Library CircleDisplay

The attached project wraps this Github project. The library files (JAR & XML) are in the /files folder of the B4A project. Copy them to your additional library folder. I have used a timer purely for demonstration purposes - it can run without the timer. Follow the B4A code.

You will also need android-support-v4.jar. You can download it from here. Copy it to your additional library folder.

Also posting the Java Code. You will need to add a folder named "libs" on the same level as the src folder and copy android-support-v4.jar into the "libs" folder in order to compile the java project into a JAR.

Quite a nice animation...


A screenshot:

1.png
 

Attachments

  • b4aCircleDisplay.zip
    22.9 KB · Views: 543
  • Java Code.zip
    19.3 KB · Views: 571
Last edited:

Harris

Expert
Licensed User
Longtime User
Good God man...

I just got ArcProgressMaster figured out (with your help) and here you present another temptation!

Does it ever end with you wrappers...?

We shall call you MC Hammer... (can't touch this...) lol


funny... (In Living Color - MC Hammer)
 
Last edited:

MarcoRome

Expert
Licensed User
Longtime User
Hi Johan.
Exist one solution that start with one % example :

ultimo.jpg

and in second time i add another % example:

B4X:
Sub Button1_Click

    For i = 61 To 100
        Dim aa As Float
        aa = i
        cd4.showValue(aa, 100.0, True)     
    Next

Thanks
Marco
 

JTKEK

Member
Licensed User
Longtime User
it is possible to do a countdown timer with this library
i means from 5 to 0
but the progress increase
 

Johan Schoeman

Expert
Licensed User
Longtime User
it is possible to do a countdown timer with this library
i means from 5 to 0
but the progress increase
Try it with this new lib files (copy them to your additional library folder). See the line cd1.CountDown = False in the code below that I have added to the original project. It will allow the progress indicator to increase but if you set cd1.CountDown = True the value in the circle will count down.

B4X:
    cd1.DrawText = True
    cd1.StartAngle = 0                       'any value from 0 to 360
    cd1.DrawInnerCircle = True
    cd1.AnimDuration = 5000
    cd1.ValueWidthPercent = 55.0
    cd1.DimAlpha = 150
    cd1.Unit = "%"
    cd1.FormatDigits = 2                  '1 digit after the decimal point
    cd1.Color = Colors.Red
    cd1.TextSize = 15.0
    cd1.InnerCircleColor = Colors.LightGray
    cd1.TextColor = Colors.Blue
    cd1.CountDown = False                  'number counts up/down while progress increases
 

Attachments

  • CircleDisplay.zip
    10.2 KB · Views: 248

cuellar

Member
Licensed User
Longtime User
Hi Johan, the Enabled method not work when I set it False. I want to avoid circle display, change when the user touch them.
Thanks.
 
Top