Public Sub Initialize(Callback As Object, EventName As String)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
ELEVATEUI · B4A · XUI
Cart-style button with expandable quantity controls, value boundaries, badge and animation customization.
Inputs & forms
Cart-style button with expandable quantity controls, value boundaries, badge and animation customization.
Animated conceptual demonstration, not an exact Android control screenshot.
See verified public methods and events to integrate this component.
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.
Dim cart As UICartButton
cart.Initialize(Me, "cart")
cart.AddToParent(Activity, 16dip, 24dip, 240dip, 56dip)
cart.setMinValue(0)
cart.setMaxValue(10)
cart.setValue(1)
cart.setBackgroundColors(Array As Int(0xFF6750A4, 0xFF03DAC6))
69 audited signatures
Public Sub Initialize(Callback As Object, EventName As String)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub DesignerCreateView(Base As Object, Lbl As Label, Props As Map)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub AddToParent(Parent As B4XView, Left As Int, Top As Int, Width As Int, Height As Int)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub getBase As B4XView
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Returns: B4XView
Public Sub setBadgeBackgroundColor(Color As Int)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setBadgeTextColor(Color As Int)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setBadgeBorderColor(Color As Int)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub getCustomContent As B4XView
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Returns: B4XView
Public Sub getCollapseAtMinimum As Boolean
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Returns: Boolean
Public Sub setValue(Value As Int)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setValue2(Value As Int, FireEvent As Boolean)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub getValue As Int
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Returns: Int
Public Sub setProgrammaticEvents(Enabled As Boolean)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setMinValue(Value As Int)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub getMinValue As Int
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Returns: Int
Public Sub setMaxValue(Value As Int)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub getMaxValue As Int
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Returns: Int
Public Sub setStep(Value As Int)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub getStep As Int
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Returns: Int
Public Sub setEnabled(Enabled As Boolean)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub getEnabled As Boolean
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Returns: Boolean
Public Sub setExpanded(Expanded As Boolean)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub getExpanded As Boolean
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Returns: Boolean
Public Sub setText(Text As String)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub getText As String
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Returns: String
Public Sub setTextColor(Color As Int)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub getTextColor As Int
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Returns: Int
Public Sub setTextSize(Size As Float)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub getTextSize As Float
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Returns: Float
Public Sub setTextAlignment(Horizontal As String, Vertical As String)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setBackgroundColor(Color As Int)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setBackgroundColors(ColorsList As List)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setGradientDirection(Direction As String)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub getGradientDirection As String
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Returns: String
Public Sub getBackgroundColors As Int()
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Returns: Int()
Public Sub setCounterColor(Color As Int)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setControlColor(Color As Int)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setControlTextColor(Color As Int)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setBorderColor(Color As Int)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setBorderWidth(Width As Float)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setCornerRadius(Radius As Int)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub getCornerRadius As Int
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Returns: Int
Public Sub setMainTextTypeface(TextTypeface As Typeface)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub getMainTextTypeface As Typeface
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Returns: Typeface
Public Sub Elevation(BtElevation As Float, Color As Int)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub SetTextGlow(Radius As Float, GlowColor As Int)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setColorEffectSelecting(Enabled As Boolean)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub getColorEffectSelecting As Boolean
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Returns: Boolean
Public Sub setPadding(Padding As Int)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setControlWidth(Width As Int)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setCustomContentWidth(Width As Int)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setAnimationDuration(Duration As Int)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setShowAnimation(Enabled As Boolean)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setCollapseAtMinimum(Enabled As Boolean)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setShowShadow(Show As Boolean)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setShadow(Color As Int, Offset As Float)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub SetIcon(Icon As String, FontIcon As B4XFont, Color As Int, Position As String)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setIconTypeface(Icon As String, Color As Int, IconTypeface As Typeface, Position As String)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setIconColor(Color As Int)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setIconSize(Size As Float)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setImageSize(Size As Int)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setIconPosition(Position As String)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub setContentPosition(Position As String)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub getContentPosition As String
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Returns: String
Public Sub setImagePosition(Position As String)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub getImagePosition As String
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Returns: String
Public Sub SetImage(Directory As String, FileName As String)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub SetImageBitmap(Bitmap As B4XBitmap)
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
Public Sub Reset
Public API declaration; refer to the library behavior for usage details.
Original catalog note: Verified against supplied 2026-11-28 .b4xlib
#DesignerProperty: Key: DefaultValue, DisplayName: Default Value, FieldType: Int, DefaultValue: 0, MinRange: -999999, MaxRange: 999999#DesignerProperty: Key: MinValue, DisplayName: Minimum Value, FieldType: Int, DefaultValue: 0, MinRange: 0, MaxRange: 999999#DesignerProperty: Key: MaxValue, DisplayName: Maximum Value, FieldType: Int, DefaultValue: 99, MinRange: -999999, MaxRange: 999999#DesignerProperty: Key: Step, DisplayName: Step, FieldType: Int, DefaultValue: 1, MinRange: 1, MaxRange: 9999#DesignerProperty: Key: Text, DisplayName: Text, FieldType: String, DefaultValue: Add to cart#DesignerProperty: Key: TextColor, DisplayName: Text Color, FieldType: Color, DefaultValue: 0xFFFFFFFF#DesignerProperty: Key: BackgroundColor, DisplayName: Background Color, FieldType: Color, DefaultValue: 0xFF6750A4#DesignerProperty: Key: IconColor, DisplayName: Icon Color, FieldType: Color, DefaultValue: 0xFFFFFFFF#DesignerProperty: Key: CornerRadius, DisplayName: Corner Radius, FieldType: Int, DefaultValue: 14, MinRange: 0, MaxRange: 100#DesignerProperty: Key: AnimationEnabled, DisplayName: Animation Enabled, FieldType: Boolean, DefaultValue: True#DesignerProperty: Key: AnimationDuration, DisplayName: Animation Duration, FieldType: Int, DefaultValue: 220, MinRange: 0, MaxRange: 2000#DesignerProperty: Key: TextSize, DisplayName: Text Size, FieldType: Int, DefaultValue: 15, MinRange: 8, MaxRange: 40#DesignerProperty: Key: GradientDirection, DisplayName: Gradient Direction, FieldType: String, DefaultValue: AUTO, List: AUTO|TOP_BOTTOM|TR_BL|RIGHT_LEFT|BR_TL|BOTTOM_TOP|BL_TR|LEFT_RIGHT|TL_BR#DesignerProperty: Key: ColorEffectSelecting, DisplayName: Color Effect Selecting, FieldType: Boolean, DefaultValue: TrueInitialize 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 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
Raised when the user taps the control; use it to trigger a real action.
B4A handler signature with Demo prefix
Private Sub Demo_LongClick()
Log("LongClick")
End Sub
Raised when a selection or value changes; use it to update dependent data.
B4A handler signature with Demo prefix
Private Sub Demo_ValueChanged(Value As Int)
Log("ValueChanged")
End Sub
Event declared by this module. Handle the indicated action in the callback.
B4A handler signature with Demo prefix
Private Sub Demo_Increment(Value As Int)
Log("Increment")
End Sub
Event declared by this module. Handle the indicated action in the callback.
B4A handler signature with Demo prefix
Private Sub Demo_Decrement(Value As Int)
Log("Decrement")
End Sub
Event declared by this module. Handle the indicated action in the callback.
B4A handler signature with Demo prefix
Private Sub Demo_LimitReached(Value As Int)
Log("LimitReached")
End Sub
Raised when a selection or value changes; use it to update dependent data.
B4A handler signature with Demo prefix
Private Sub Demo_StateChanged(Expanded As Boolean)
Log("StateChanged")
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 Const CONTENT_POSITION_LEFT As String = "Left"Public Const CONTENT_POSITION_RIGHT As String = "Right"Public Const CONTENT_POSITION_TOP As String = "Top"Public Const CONTENT_POSITION_BOTTOM As String = "Bottom"Public Const ICON_POSITION_LEFT As String = "Left"Public Const ICON_POSITION_RIGHT As String = "Right"Public Const ICON_POSITION_TOP As String = "Top"Public Const ICON_POSITION_BOTTOM As String = "Bottom"Public Const GRADIENT_AUTO As String = "AUTO"Public Const GRADIENT_TOP_BOTTOM As String = "TOP_BOTTOM"Public Const GRADIENT_TR_BL As String = "TR_BL"Public Const GRADIENT_RIGHT_LEFT As String = "RIGHT_LEFT"Public Const GRADIENT_BR_TL As String = "BR_TL"Public Const GRADIENT_BOTTOM_TOP As String = "BOTTOM_TOP"Public Const GRADIENT_BL_TR As String = "BL_TR"Public Const GRADIENT_LEFT_RIGHT As String = "LEFT_RIGHT"Public Const GRADIENT_TL_BR As String = "TL_BR"Public mBase As B4XViewPublic Tag As Object