Public Sub Initialize (Callback As Object, EventName As String)
Prepare the instance before its other methods.
ELEVATEUI · B4A · XUI
Show a completion ratio without taking horizontal dashboard space.
Progress & measurement
Show a completion ratio without taking horizontal dashboard space.
Animated conceptual demonstration, not an exact Android control screenshot.
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.
Tutorials are based on existing project examples or audited APIs. Check each example’s prerequisites; B4A compilation is not claimed.
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.
17 audited signatures
Public Sub Initialize (Callback As Object, EventName As String)
Prepare the instance before its other methods.
Public Sub DesignerCreateView (Base As Object, Lbl As Label, Props As Map)
Invoked automatically by the B4A Visual Designer; do not call manually.
Public Sub AddToParent(Parent As B4XView, Left As Int, Top As Int, Width As Int, Height As Int)
Add this view to a parent container using the supplied bounds and options.
Public Sub setCenterType(CenterType As String)
Update center type at runtime when this setting changes.
Public Sub DrawProgress
Use DrawProgress for its named operation; follow its exact signature.
Public Sub setValue(Value As Float)
Update value at runtime when this setting changes.
Public Sub geValue As Float
Use geValue for its named operation; follow its exact signature.
Returns: Float
Public Sub setColor(Color As Int)
Update color at runtime when this setting changes.
Public Sub getColor As Int
Read the current color value for validation or UI synchronization.
Returns: Int
Public Sub SaveAsPNG(Dir As String, FileName As String) As Boolean
Use SaveAsPNG for its named operation; follow its exact signature.
Returns: Boolean
Public Sub setWidthStroke(Width As Int)
Update width stroke at runtime when this setting changes.
Public Sub setTitle(Text As String)
Update title at runtime when this setting changes.
Public Sub setTitleTextColor(Color As Int)
Update title text color at runtime when this setting changes.
Public Sub setTitleFont(Font As B4XFont)
Update title font at runtime when this setting changes.
Public Sub setTitleFontSize(Size As Int)
Update title font size at runtime when this setting changes.
Original catalog note: Overrides the center title font size; 0 uses the automatic sizing mode.
Public Sub setValueMin(Value As Float)
Update value min at runtime when this setting changes.
Public Sub setValueMax(Value As Float)
Update value max at runtime when this setting changes.
#DesignerProperty: Key: MinValue, DisplayName: Minimum Value, FieldType: Float, DefaultValue: 0, Description: Minimum value of the progress.#DesignerProperty: Key: MaxValue, DisplayName: Maximum Value, FieldType: Float, DefaultValue: 100, Description: Maximum value of the progress.#DesignerProperty: Key: CurrentValue, DisplayName: Current Value, FieldType: Float, DefaultValue: 50, Description: Current value of the progress.#DesignerProperty: Key: StrokeWidth, DisplayName: Stroke Width, FieldType: Int, DefaultValue: 10, Description: Thickness of the arc in dip.#DesignerProperty: Key: ProgressColor, DisplayName: Progress Color, FieldType: Color, DefaultValue: 0xFFFF5555, Description: Color of the progress arc.#DesignerProperty: Key: CenterText, DisplayName: Center Text, FieldType: String, DefaultValue: , Description: Custom text for the center (leave blank to use value).#DesignerProperty: Key: DisplayAs, DisplayName: Display As, FieldType: String, DefaultValue: Progress, Description: Display mode for center text (Progress or Percentage), List: Progress|Percentage#DesignerProperty: Key: AnimationDuration, DisplayName: Animation Duration, FieldType: Int, DefaultValue: 1000, Description: Duration of the progress animation in milliseconds.#DesignerProperty: Key: TitleText, DisplayName: Title Text, FieldType: String, DefaultValue: , Description: Title text to display above the progress circle.#DesignerProperty: Key: TitleFontSize, DisplayName: Title Font Size, FieldType: Int, DefaultValue: 0, Description: Title font size in dip. Use 0 to fit automatically.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.
Raised when a selection or value changes; use it to update dependent data.
B4A handler signature with Demo prefix
Private Sub Demo_ValueChanged(NewValue As Float)
Log("ValueChanged")
End Sub
Raised when the user taps the control; use it to trigger a real action.
B4A handler signature with Demo prefix
Private Sub Demo_Click()
Log("Click")
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.
Public Tag As Object