Public Sub Initialize (Callback As Object, EventName As String)
Prepare the instance before its other methods.
Original catalog note: Initializes the control
ELEVATEUI · B4A · XUI
Capture an independent yes/no choice, including form consent or settings.
Inputs & forms
Capture an independent yes/no choice, including form consent or settings.
Animated conceptual demonstration, not an exact Android control screenshot.
In a data-entry form, connect the chosen value to validation and the action that submits the form.
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.
40 audited signatures
Public Sub Initialize (Callback As Object, EventName As String)
Prepare the instance before its other methods.
Original catalog note: Initializes the control
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
Public Sub AddToParent(Parent As B4XView, Left As Int, Top As Int, Width As Int, Height As Int, CornerRadius As Int, Checked As Boolean, Text As String)
Add this view to a parent container using the supplied bounds and options.
Original catalog note: Adds the control to a parent view
Public Sub CreateFieldsetGroup(Parent As B4XView, Left As Int, Top As Int, Width As Int, Height As Int, GroupTitle As String) As B4XView
Use CreateFieldsetGroup for its named operation; follow its exact signature.
Original catalog note: Static Helper to Create Fieldset Container with Legend Label around Checkboxes
Returns: B4XView
Public Sub SetIndeterminate(Indeterminate As Boolean)
Use SetIndeterminate for its named operation; follow its exact signature.
Original catalog note: Set Indeterminate State (dash icon)
Public Sub setUncheckedBackgroundColor(Color As Int)
Update unchecked background color at runtime when this setting changes.
Original catalog note: Set Custom Unchecked Background Color
Public Sub Base_Resize (Width As Double, Height As Double)
Use Base_Resize for its named operation; follow its exact signature.
Original catalog note: Resizes the control
Public Sub setText(Text As String)
Update text at runtime when this setting changes.
Original catalog note: Sets the text of the control
Public Sub getText As String
Read the current text value for validation or UI synchronization.
Original catalog note: Gets the text of the control
Returns: String
Public Sub setTextColor(Color As Int)
Update text color at runtime when this setting changes.
Original catalog note: Sets the text color of the control
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 control
Returns: Int
Public Sub setChecked(Checked As Boolean)
Update checked at runtime when this setting changes.
Original catalog note: Sets the checked state of the control
Public Sub getChecked As Boolean
Read the current checked value for validation or UI synchronization.
Original catalog note: Gets the checked state of the control
Returns: Boolean
Public Sub setTextFontType(Font As B4XFont)
Update text font type at runtime when this setting changes.
Original catalog note: Sets the font type of the text
Public Sub getTextFontType As B4XFont
Read the current text font type value for validation or UI synchronization.
Original catalog note: Gets the font type of the text
Returns: B4XFont
Public Sub setIconSize(Size As Float)
Update icon size at runtime when this setting changes.
Original catalog note: Sets the icon size
Public Sub getIconSize As Float
Read the current icon size value for validation or UI synchronization.
Original catalog note: Gets the icon size
Returns: Float
Public Sub SetIcon(Icon As String, Font As B4XFont)
Use SetIcon for its named operation; follow its exact signature.
Original catalog note: Sets the icon for the control
Public Sub SetImage(FileDir As String, FileName As String, KeepAspectRatio As Boolean)
Use SetImage for its named operation; follow its exact signature.
Original catalog note: Sets an image for the control
Public Sub setBorderCornerRadius(Radius As Int)
Update border corner radius at runtime when this setting changes.
Original catalog note: Sets the border corner radius
Public Sub setBorderWidth(Width As Int)
Update border width at runtime when this setting changes.
Original catalog note: Sets the border width
Public Sub getIconColor As Int
Read the current icon color value for validation or UI synchronization.
Original catalog note: Gets the icon color
Returns: Int
Public Sub setIconColor(Color As Int)
Update icon color at runtime when this setting changes.
Original catalog note: Sets the icon color
Public Sub setCheckedBackgroundColor(Color As Int)
Update checked background color at runtime when this setting changes.
Original catalog note: Sets the checked background color
Public Sub getCheckedBackgroundColor As Int
Read the current checked background color value for validation or UI synchronization.
Returns: Int
Public Sub setCheckedAnimated(Animated As Boolean)
Update checked animated at runtime when this setting changes.
Original catalog note: Sets whether the check state is animated
Public Sub setEnabled(Enable As Boolean)
Update enabled at runtime when this setting changes.
Original catalog note: Sets whether the control is enabled
Public Sub getEnabled As Boolean
Read the current enabled value for validation or UI synchronization.
Original catalog note: Gets whether the control is enabled
Returns: Boolean
Public Sub getDisabledBackgroundColor As Int
Read the current disabled background color value for validation or UI synchronization.
Original catalog note: Gets the disabled background color
Returns: Int
Public Sub setDisabledBackgroundColor(Color As Int)
Update disabled background color at runtime when this setting changes.
Original catalog note: Sets the disabled background color
Public Sub getDisabledIconColor As Int
Read the current disabled icon color value for validation or UI synchronization.
Original catalog note: Gets the disabled icon color
Returns: Int
Public Sub setDisabledIconColor(Color As Int)
Update disabled icon color at runtime when this setting changes.
Original catalog note: Sets the disabled icon color
Public Sub getIsHaptic As Boolean
Read the current is haptic value for validation or UI synchronization.
Original catalog note: Gets whether haptic feedback is enabled
Returns: Boolean
Public Sub setIsHaptic(Enabled As Boolean)
Update is haptic at runtime when this setting changes.
Original catalog note: Sets whether haptic feedback is enabled
Public Sub getIsEvent As Boolean
Read the current is event value for validation or UI synchronization.
Original catalog note: Gets whether events are enabled
Returns: Boolean
Public Sub setIsEvent(Enabled As Boolean)
Update is event at runtime when this setting changes.
Original catalog note: Sets whether events are enabled
Public Sub setTextFontSize(FontSize As Float)
Update text font size at runtime when this setting changes.
Original catalog note: Sets the text font size
Public Sub setTextBold(Bold As Boolean)
Update text bold at runtime when this setting changes.
Original catalog note: Sets whether the text is bold
Public Sub getTextFontSize As Float
Read the current text font size value for validation or UI synchronization.
Original catalog note: Gets the text font size
Returns: Float
Public Sub getTextBold As Boolean
Read the current text bold value for validation or UI synchronization.
Original catalog note: Gets whether the text is bold
Returns: Boolean
#DesignerProperty: Key: CheckedBackgroundColor, DisplayName: Checked Background Color, FieldType: Color, DefaultValue: 0xFF60A7C6#DesignerProperty: Key: IconColor, DisplayName: Icon Color, FieldType: Color, DefaultValue: 0xFFFFFFFF#DesignerProperty: Key: IconSize, DisplayName: Icon Size, FieldType: Float, DefaultValue: 22, MinRange: 8.0, Description: Size of the icon in pixels.#DesignerProperty: Key: DisabledBackgroundColor, DisplayName: Disabled Background Color, FieldType: Color, DefaultValue: 0x80969292#DesignerProperty: Key: DisabledIconColor, DisplayName: Disabled Icon Color, FieldType: Color, DefaultValue: 0x98FFFFFF#DesignerProperty: Key: BorderWidth, DisplayName: Border Width, FieldType: Int, DefaultValue: 5, MinRange: 1#DesignerProperty: Key: BorderCornerRadius, DisplayName: Border Corner Radius, FieldType: Int, DefaultValue: 10, MinRange: 0#DesignerProperty: Key: CheckedAnimated, DisplayName: Checked Animated, FieldType: Boolean, DefaultValue: True#DesignerProperty: Key: HapticFeedback, DisplayName: Haptic Feedback, FieldType: Boolean, DefaultValue: True, Description: Whether to make a haptic feedback when the user clicks on the control.#DesignerProperty: Key: Checked, DisplayName: Checked, FieldType: Boolean, DefaultValue: False#DesignerProperty: Key: Enabled, DisplayName: Enabled, FieldType: Boolean, DefaultValue: True#DesignerProperty: Key: Text, DisplayName: Text, FieldType: String, DefaultValue:#DesignerProperty: Key: TextColor, DisplayName: Text Color, FieldType: Color, DefaultValue: 0xFF000000#DesignerProperty: Key: TextFontSize, DisplayName: Text Font Size, FieldType: Float, DefaultValue: 16#DesignerProperty: Key: TextBold, DisplayName: Text Bold, FieldType: Boolean, DefaultValue: FalseInitialize 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_CheckedChange(Checked As Boolean)
Log("CheckedChange")
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 mBase As B4XView ' Base viewPublic Tag As Object ' Tag for the viewPublic LabelPosition As String = "RIGHT" ' "RIGHT" (Position Start) or "LEFT" (Position End)