B4X Store

ELEVATEUI · B4A · XUI

UIGauge

Display a measured value against a configured minimum and maximum, such as speed.

78 modules 1,780 APIs

Progress & measurement

What it solves

Display a measured value against a configured minimum and maximum, such as speed.

Animated conceptual demonstration, not an exact Android control screenshot.

8 methods12 Designer0 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.

Interactive speedometer with an ElevateUI refresh button
Reviewed integration tutorial Adapted from uploaded UIProgressMeters(1).zip; ElevateUI(6) API checked Not B4A-compiled

B4A Activity, XUI and ElevateUI libraries. This example builds both controls in code. Adjust dimensions for smaller screens.

' Interactive speedometer: UIGauge + UIButton
Sub Process_Globals
End Sub

Sub Globals
    Private gauge As UIGauge
    Private changeSpeed As UIButton
End Sub

Sub Activity_Create(FirstTime As Boolean)
    Activity.Color = 0xFFF2F5FC

    gauge.Initialize(Me, "Speed")
    gauge.AddToParent(Activity, (Activity.Width - 180dip) / 2, _
        25dip, 180dip, 180dip, "", " km/h", 0xFFFFFFFF, _
        0xFFE7ECF4, 0xFF243653, 16, True, 25dip)
    gauge.SetMinAndMax(0, 120)
    gauge.CurrentValue = 84

    changeSpeed.Initialize(Me, "changeSpeed")
    changeSpeed.AddToParent(Activity, (Activity.Width - 190dip) / 2, _
        224dip, 190dip, 44dip, 1, 14, "Change speed", _
        Colors.White, 0xFF8B5CF6, 0xFF06B6D4, "TL_BR", 10)
End Sub

Private Sub changeSpeed_Click
    Dim newSpeed As Int = Rnd(0, 121)
    gauge.CurrentValue = newSpeed
    Log("New speed: " & gauge.CurrentValue & " km/h")
End Sub

Sub Activity_Resume
End Sub

Sub Activity_Pause(UserClosed As Boolean)
End Sub

Public methods reference

8 audited signatures

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

Prepare the instance before its other methods.

Original catalog note: Initializes the gauge with the callback and event name

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 in the designer

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,Preffix As String,suffix As String,ColorCenter As Int,ColorBackground As Int,ColorTex As Int,SizeText As Float, IsFullCicle As Boolean,IndicatorHeight As Int)

Public API declaration; refer to the library behavior for usage details.

Original catalog note: Verified against supplied 2026-11-28 .b4xlib

Parent As B4XViewl As Intt As Intw As Inth As IntPreffix As Stringsuffix As StringColorCenter As IntColorBackground As IntColorTex As IntSizeText As FloatIsFullCicle As BooleanIndicatorHeight As Int
Public Sub SetMinAndMax(NewMinValue As Float, NewMaxValue As Float)

Use SetMinAndMax for its named operation; follow its exact signature.

Original catalog note: Sets the minimum and maximum values for the gauge

NewMinValue As FloatNewMaxValue As Float
Public Sub SetRanges(Ranges As List)

Use SetRanges for its named operation; follow its exact signature.

Original catalog note: Sets the ranges for the gauge

Ranges As List
Public Sub CreateRange(LowValue As Float, HighValue As Float, Color As Int) As GaugeRange

Use CreateRange for its named operation; follow its exact signature.

Original catalog note: Creates a range for the gauge

LowValue As FloatHighValue As FloatColor As Int

Returns: GaugeRange

Public Sub setCurrentValue (v As Float)

Update current value at runtime when this setting changes.

Original catalog note: Sets the current value of the gauge

v As Float
Public Sub getCurrentValue As Float

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

Original catalog note: Gets the current value of the gauge

Returns: Float

Designer · 12

#DesignerProperty: Key: MinValue, DisplayName: Min Value, FieldType: Float, DefaultValue: 0#DesignerProperty: Key: MaxValue, DisplayName: Max Value, FieldType: Float, DefaultValue: 100#DesignerProperty: Key: IndicatorLength, DisplayName: Indicator Length, FieldType: Int, DefaultValue: 20#DesignerProperty: Key: CenterColor, DisplayName: Center Color, FieldType: Color, DefaultValue: #FF2C3144#DesignerProperty: Key: BackgroundColor, DisplayName: Background Color, FieldType: Color, DefaultValue: 0xFFFFFFFF#DesignerProperty: Key: IndicatorColor, DisplayName: Indicator Color, FieldType: Color, DefaultValue: 0xFF000000#DesignerProperty: Key: PrefixText, DisplayName: Prefix Text, FieldType: String, DefaultValue:#DesignerProperty: Key: SuffixText, DisplayName: Suffix Text, FieldType: String, DefaultValue: °#DesignerProperty: Key: Duration, DisplayName: Duration From 0 To 100, FieldType: Int, DefaultValue: 3000, Description: Milliseconds#DesignerProperty: Key: GaugeType, DisplayName: Gauge Type, FieldType: String, DefaultValue: Half Circle, List:Half Circle|Full Circle#DesignerProperty: Key: TextColor, DisplayName: Color del Texto, FieldType: Color, DefaultValue: 0xFF000000#DesignerProperty: Key: TextSize, DisplayName: Tamaño del Texto, FieldType: Int, DefaultValue: 16

Public events and how to implement them · 0

No public callback events are declared in the catalog. You can still handle B4A events for controls inserted inside it.

Public fields, constants and types

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