B4X Store

ELEVATEUI · B4A · XUI

UICircularProgressBar

Use a circular percentage indicator for battery, capacity and task progress.

78 modules 1,780 APIs

Progress & measurement

What it solves

Use a circular percentage indicator for battery, capacity and task progress.

Animated conceptual demonstration, not an exact Android control screenshot.

13 methods7 Designer1 events

When to use this module

During a long operation, connect this indicator to real progress updates rather than leaving a decorative percentage.

Before integrating, examine its methods, events and Designer options.

B4A integration examples

Tutorials are based on existing project examples or audited APIs. Check each example’s prerequisites; B4A compilation is not claimed.

Practical tutorial awaiting verification

The public API, events and properties remain available. An isolated initialization is not presented as a full example; a tutorial will be added after a functional sequence is documented.

Public methods reference

13 audited signatures

Public Sub Initialize (Callback As Object, EventName As String)

Prepare the instance before its other methods.

Original catalog note: Initializes the custom view.

Callback As ObjectEventName As String
Public Sub DesignerCreateView (Base As Object, Lbl As Label, Props As Map)

Invoked automatically by the B4A Visual Designer; do not call manually.

Original catalog note: Creates the view during design time.

Base As ObjectLbl As LabelProps As Map
Public Sub AddToParent(Parent As B4XView, l As Int, t As Int, w As Int, h As Int, FirstColor As Int, SecondColor As Int, StrokeWidth As Int, Text_size As Int, Text_Color As Int) As B4XView

Add this view to a parent container using the supplied bounds and options.

Original catalog note: Adds the custom view to a parent view.

Parent As B4XViewl As Intt As Intw As Inth As IntFirstColor As IntSecondColor As IntStrokeWidth As IntText_size As IntText_Color As Int

Returns: B4XView

Public Sub setValue(NewValue As Float)

Update value at runtime when this setting changes.

Original catalog note: Sets the current value of the progress bar and animates the change.

NewValue As Float
Public Sub getValue As Float

Read the current value value for validation or UI synchronization.

Original catalog note: Gets the current value of the progress bar.

Returns: Float

Public Sub setColorEmpty(Color As Int)

Update color empty at runtime when this setting changes.

Original catalog note: Sets the color for the empty part of the progress bar.

Color As Int
Public Sub getColorEmpty As Int

Read the current color empty value for validation or UI synchronization.

Original catalog note: Gets the color for the empty part of the progress bar.

Returns: Int

Public Sub setTextColor(Color As Int)

Update text color at runtime when this setting changes.

Original catalog note: Sets the text color of the central label.

Color As Int
Public Sub getTextColor As Int

Read the current text color value for validation or UI synchronization.

Original catalog note: Gets the text color of the central label.

Returns: Int

Public Sub setTextSize(Size As Int)

Update text size at runtime when this setting changes.

Original catalog note: Sets the font size of the central label.

Size As Int
Public Sub getTextSize As Int

Read the current text size value for validation or UI synchronization.

Original catalog note: Gets the font size of the central label.

Returns: Int

Public Sub setTextFont(Font As B4XFont)

Update text font at runtime when this setting changes.

Original catalog note: Sets the font of the central label.

Font As B4XFont
Public Sub getTextFont As B4XFont

Read the current text font value for validation or UI synchronization.

Original catalog note: Gets the font of the central label.

Returns: B4XFont

Designer · 7

#DesignerProperty: Key: FirstColor, DisplayName: First Color, FieldType: Color, DefaultValue: #FFA9D8FF, Description: Color for the progress bar's start.#DesignerProperty: Key: SecondColor, DisplayName: Second Color, FieldType: Color, DefaultValue: 0xFF004884, Description: Color for the progress bar's end.#DesignerProperty: Key: ColorEmpty, DisplayName: Color Empty, FieldType: Color, DefaultValue: 0xFFE4DADA, Description: Color for the empty part of the progress bar.#DesignerProperty: Key: StrokeWidth, DisplayName: Stroke Width, FieldType: Int, DefaultValue: 10, Description: Width of the progress bar stroke.#DesignerProperty: Key: Duration, DisplayName: Duration From 0 To 100, FieldType: Int, DefaultValue: 3000, Description: Animation duration in milliseconds.#DesignerProperty: Key: TextSize, DisplayName: Text Size, FieldType: Int, DefaultValue: 16, Description: Font size of the central text.#DesignerProperty: Key: TextColor, DisplayName: Text Color, FieldType: Color, DefaultValue: 0xFF000000, Description: Color of the central text.

Public events and how to implement them · 1

Initialize with Me and the event prefix Demo, then add the following handler to your B4A module. Names and arguments come from the library declaration.

ValueChange(value As Float)

Raised when a selection or value changes; use it to update dependent data.

B4A handler signature with Demo prefix

Private Sub Demo_ValueChange(value As Float)
    Log("ValueChange")
End Sub

For code-created controls use Initialize(Me, "Demo") when that signature exists; for Designer controls set the event name there. Replace Demo with the actual prefix.

Source: ElevateUI public API catalog; tutorials cross-checked against ElevateUI(6).b4xlib. Visualizations are illustrative; sample code requires B4A compilation.