B4X Store

ELEVATEUI · B4A · XUI

UIBadge

Display compact counters, labels, or status next to an existing control.

78 modules 1,780 APIs

Effects & interface utilities

What it solves

Display compact counters, labels, or status next to an existing control.

Animated conceptual demonstration, not an exact Android control screenshot.

35 methods0 Designer0 events

When to use this module

Show unread notification counts beside a bell, inbox or pending orders; update the count after a user action.

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

35 audited signatures

Public Sub Initialize

Prepare the instance before its other methods.

Public Sub SetRootParent(IconContainer As B4XView, RootParent As B4XView)

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

Original catalog note: IconContainer: the view that contains the icons (e.g. menu.Panel) RootParent: the root view that will host the badges (e.g. Activity) Example: badgeManager.SetRootParent(menu.Panel, Activity)

IconContainer As B4XViewRootParent As B4XView
Public Sub RefreshRootOffset(IconContainer As B4XView)

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

Original catalog note: Call this if the menu or root view moves/resizes to refresh the offset.

IconContainer As B4XView
Public Sub ClearRootParent

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

Original catalog note: Disables root parent mode (badges go back to their normal container).

Public Sub setBackgroundColor(Color As Int)

Update background color at runtime when this setting changes.

Original catalog note: ============ SET/GET METHODS FOR COLORS AND CONFIGURATION ============

Color As Int
Public Sub getBackgroundColor As Int

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

Returns: Int

Public Sub setTextColor(Color As Int)

Update text color at runtime when this setting changes.

Color As Int
Public Sub getTextColor As Int

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

Returns: Int

Public Sub setBorderColor(Color As Int)

Update border color at runtime when this setting changes.

Color As Int
Public Sub getBorderColor As Int

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

Returns: Int

Public Sub setBorderWidth(Width As Int)

Update border width at runtime when this setting changes.

Width As Int
Public Sub getBorderWidth As Int

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

Returns: Int

Public Sub setSize(Size As String)

Update size at runtime when this setting changes.

Original catalog note: Size: "xs", "sm", "md", "lg", "xl", or "2xl".

Size As String
Public Sub getSize As String

Read the current size value for validation or UI synchronization.

Returns: String

Public Sub setCapValue(Cap As Int)

Update cap value at runtime when this setting changes.

Cap As Int
Public Sub getCapValue As Int

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

Returns: Int

Public Sub setAnimationDuration(Duration As Int)

Update animation duration at runtime when this setting changes.

Duration As Int
Public Sub getAnimationDuration As Int

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

Returns: Int

Public Sub setCornerRadius(Radius As Int)

Update corner radius at runtime when this setting changes.

Original catalog note: Corner radius control

Radius As Int
Public Sub getCornerRadius As Int

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

Returns: Int

Public Sub setAutoDisableClipping(Enabled As Boolean)

Update auto disable clipping at runtime when this setting changes.

Original catalog note: Control de clipping automático

Enabled As Boolean
Public Sub getAutoDisableClipping As Boolean

Read the current auto disable clipping value for validation or UI synchronization.

Returns: Boolean

Public Sub setOffset(OffsetX As Int, OffsetY As Int)

Update offset at runtime when this setting changes.

Original catalog note: Offset to pull the badge closer/farther from its host icon. offsetX/offsetY: positive = closer to center of icon (inward shift). Default is 6dip for both.

OffsetX As IntOffsetY As Int
Public Sub getOffsetX As Int

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

Returns: Int

Public Sub getOffsetY As Int

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

Returns: Int

Public Sub SetBadge(TargetView As B4XView, Value As String, Gravity1 As String)

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

Original catalog note: ============ MAIN BADGE METHODS ============ Sets or updates a badge on any view resource indicating its position (Gravity)

TargetView As B4XViewValue As StringGravity1 As String
Public Sub RemoveBadge(TargetView As B4XView)

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

TargetView As B4XView
Public Sub GetBadge(TargetView As B4XView) As String

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

TargetView As B4XView

Returns: String

Public Sub GetBadgeGravity(TargetView As B4XView) As String

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

TargetView As B4XView

Returns: String

Public Sub UpdateValue(TargetView As B4XView, NewValue As String)

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

Original catalog note: Allows updating only the value without changing the position

TargetView As B4XViewNewValue As String
Public Sub UpdateGravity(TargetView As B4XView, NewGravity As String)

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

Original catalog note: Allows updating only the position without changing the value

TargetView As B4XViewNewGravity As String
Public Sub RefreshAllBadges()

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

Original catalog note: Method to refresh all badges (useful after size changes)

Public Sub RemoveAllBadges()

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

Original catalog note: Removes all badges

Public Sub HasBadge(TargetView As B4XView) As Boolean

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

Original catalog note: Checks if a badge exists

TargetView As B4XView

Returns: Boolean

Public Sub GetBadgePanel(TargetView As B4XView) As B4XView

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

Original catalog note: Gets the badge panel (for advanced manipulation)

TargetView As B4XView

Returns: B4XView

Designer · 0

No custom Designer properties were found in the audited API.

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 Const GRAVITY_TOP_RIGHT As String = "TOP_RIGHT"Public Const GRAVITY_TOP_LEFT As String = "TOP_LEFT"Public Const GRAVITY_BOTTOM_RIGHT As String = "BOTTOM_RIGHT"Public Const GRAVITY_BOTTOM_LEFT As String = "BOTTOM_LEFT"Public Const GRAVITY_CENTER_TOP As String = "CENTER_TOP"Public Const GRAVITY_CENTER_BOTTOM As String = "CENTER_BOTTOM"Public Const GRAVITY_CENTER As String = "CENTER"
Source: ElevateUI public API catalog; tutorials cross-checked against ElevateUI(6).b4xlib. Visualizations are illustrative; sample code requires B4A compilation.