B4A Library JellyToggleButton

This is a wrap for this github project.

- You need B4A 6+ to use this library.

DonManfred (wrapper)
Version: 1
  • JellyToggleButton
    • onStateChange (position As Float, state sign As Object)
    • ba As BA
    • BringToFront
    • DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
    • Initialize (EventName As String)
    • Invalidate
    • Invalidate2 (arg0 As Rect)
    • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • IsInitialized As Boolean
    • RemoveView
    • RequestFocus As Boolean
    • SendToBack
    • SetBackgroundImage (arg0 As Bitmap)
    • SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
    • SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
    • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
    • removeCustomJelly
    • setChecked2 (checked As Boolean, callListener As Boolean)
    • setCheckedImmediately2 (checked As Boolean, callListener As Boolean)
    • setText2 (leftText As String, rightText As String)
    • toggle
    • toggle2 (callListener As Boolean)
    • toggleImmediately
    • toggleImmediately2 (callListener As Boolean)
    • Background As Drawable
    • BackgroundColor As Int [write only]
    • BackgroundColor2 As String [write only]
    • BackgroundMeasureRatio As Float
    • BackgroundRadius As Float
    • BezierControlValue As Float
    • BezierScaleRatioValue As Float
    • Checked As Boolean
    • CheckedImmediately As Boolean [write only]
    • Color As Int [write only]
    • ColorChangeType As ColorChangeType
    • CustomJelly As JellyStyle
    • Draggable As Boolean
    • Duration As Int
    • EaseInBack As EaseType [read only]
    • EaseInBounce As EaseType [read only]
    • EaseInCirc As EaseType [read only]
    • EaseInCubic As EaseType [read only]
    • EaseInElastic As EaseType [read only]
    • EaseInExpo As EaseType [read only]
    • EaseInOutBack As EaseType [read only]
    • EaseInOutBounce As EaseType [read only]
    • EaseInOutCirc As EaseType [read only]
    • EaseInOutCubic As EaseType [read only]
    • EaseInOutElastic As EaseType [read only]
    • EaseInOutExpo As EaseType [read only]
    • EaseInOutQuad As EaseType [read only]
    • EaseInOutQuart As EaseType [read only]
    • EaseInOutQuint As EaseType [read only]
    • EaseInOutSine As EaseType [read only]
    • EaseInQuad As EaseType [read only]
    • EaseInQuart As EaseType [read only]
    • EaseInQuint As EaseType [read only]
    • EaseInSine As EaseType [read only]
    • EaseLinear As EaseType [read only]
    • EaseOutBack As EaseType [read only]
    • EaseOutBounce As EaseType [read only]
    • EaseOutCirc As EaseType [read only]
    • EaseOutCubic As EaseType [read only]
    • EaseOutElastic As EaseType [read only]
    • EaseOutExpo As EaseType [read only]
    • EaseOutQuad As EaseType [read only]
    • EaseOutQuart As EaseType [read only]
    • EaseOutQuint As EaseType [read only]
    • EaseOutSine As EaseType [read only]
    • EaseType As EaseType
    • Enabled As Boolean
    • HSV As ColorChangeType [read only]
    • Height As Int
    • Jelly As Jelly
    • JellyACTIVE_STIFF_FATTY As Jelly [read only]
    • JellyACTIVE_STIFF_SLIM_JIM As Jelly [read only]
    • JellyACTIVE_TREMBLE_BODY_FATTY As Jelly [read only]
    • JellyACTIVE_TREMBLE_BODY_SLIM_JIM As Jelly [read only]
    • JellyACTIVE_TREMBLE_HEAD_FATTY As Jelly [read only]
    • JellyACTIVE_TREMBLE_HEAD_SLIM_JIM As Jelly [read only]
    • JellyACTIVE_TREMBLE_TAIL_FATTY As Jelly [read only]
    • JellyACTIVE_TREMBLE_TAIL_SLIM_JIM As Jelly [read only]
    • JellyITSELF As Jelly [read only]
    • JellyLAZY_STIFF_FATTY As Jelly [read only]
    • JellyLAZY_TREMBLE_BODY_FATTY As Jelly [read only]
    • JellyLAZY_TREMBLE_BODY_SLIM_JIM As Jelly [read only]
    • JellyLAZY_TREMBLE_HEAD_FATTY As Jelly [read only]
    • JellyLAZY_TREMBLE_HEAD_SLIM_JIM As Jelly [read only]
    • JellyLAZY_TREMBLE_TAIL_FATTY As Jelly [read only]
    • JellyLAZY_TREMBLE_TAIL_SLIM_JIM As Jelly [read only]
    • JellyRANDOM As Jelly [read only]
    • Left As Int
    • LeftBackgroundColor As Int
    • LeftBackgroundColor2 As String [write only]
    • LeftText As String
    • LeftTextColor As Int
    • LeftTextColor2 As String [write only]
    • LeftTextSize As Int
    • LeftTextTypeface As Typeface
    • LeftTextTypeface2 As String [write only]
    • LeftThumbColor As Int
    • LeftThumbColor2 As String [write only]
    • MoveToSameStateCallListener As Boolean
    • OnStateChangeListener As OnStateChangeListener
    • Parent As Object [read only]
    • RGB As ColorChangeType [read only]
    • RightBackgroundColor As Int
    • RightBackgroundColor2 As String [write only]
    • RightText As String
    • RightTextColor As Int
    • RightTextColor2 As String [write only]
    • RightTextSize As Int
    • RightTextTypeface As Typeface
    • RightTextTypeface2 As String [write only]
    • RightThumbColor As Int
    • RightThumbColor2 As String [write only]
    • StateLEFT As State [read only]
    • StateLEFT_TO_RIGHT As State [read only]
    • StateRIGHT As State [read only]
    • StateRIGHT_TO_LEFT As State [read only]
    • StretchDistanceRatioValue As Float
    • Tag As Object
    • TextColor As Int [write only]
    • TextColor2 As String [write only]
    • TextMarginBottom As Float
    • TextMarginCenter As Float
    • TextMarginLeft As Float
    • TextMarginRight As Float
    • TextMarginTop As Float
    • TextSize As Int [write only]
    • TextTypeface As Typeface [write only]
    • TextTypeface2 As String [write only]
    • ThumbColor As Int [write only]
    • ThumbColor2 As String [write only]
    • ThumbRadius As Float
    • Top As Int
    • TouchMoveRatioValue As Float
    • Visible As Boolean
    • Width As Int

Installation. Copy all THREE files from the zip JellyToggleButtonV?.?.zip to your additional libraries folder. JAR, XML and the AAR file.


  • JellyToggleButtonEx.zip
    8 KB · Views: 485
  • JellyToggleButtonV1.0.zip
    93.8 KB · Views: 515


Licensed User
Longtime User
It would be nice if you could spin off the animation from the toggle and make a separate library.
Feel free to do by yourself. The source is available on github