This is a wrap for this Github-project.
You need B4A V5.8+ to use this library.
You need B4A 6+ to use V1.5+ of this library.
New in V1.5
- The library is now available as aar file.
- I´ve added TextColor property
SwitchButton
Author: DonManfred (wrapper)
Version: 2.1
You need B4A 6+ to use V1.5+ of this library.
New in V1.5
- The library is now available as aar file.
- I´ve added TextColor property
SwitchButton
Author: DonManfred (wrapper)
Version: 2.1
- SwitchButton
Events:- onCheckedChanged (checked As Boolean)
- 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)
- isDrawDebugRect As Boolean
- isFadeBack As Boolean
- performClick As Boolean
- setText (onText As CharSequence, offText As CharSequence)
- setThumbMargin (left As Float, top As Float, right As Float, bottom As Float)
- setThumbSize (width As Float, height As Float)
- toggleImmediately
- AnimationDuration As Long
- BackColor As ColorStateList
- BackDrawable As Drawable
- BackDrawableRes As String [write only]
- BackMeasureRatio As Float
- BackRadius As Float
- BackSizeF As PointF [read only]
- Background As Drawable
- Checked As Boolean [write only]
- CheckedImmediately As Boolean [write only]
- Color As Int [write only]
- DrawDebugRect As Boolean [write only]
- Enabled As Boolean
- FadeBack As Boolean [write only]
- Height As Int
- Left As Int
- Parent As Object [read only]
- Process As Float
- Tag As Object
- ThumbColor As ColorStateList
- ThumbDrawable As Drawable
- ThumbDrawableRes As String [write only]
- ThumbHeight As Float [read only]
- ThumbMargin As RectF [read only]
- ThumbMarginRect As RectF [write only]
- ThumbRadius As Float
- ThumbSize2 As PointF [write only]
- ThumbSizeF As PointF [read only]
- ThumbWidth As Float [read only]
- TintColor As Int
- Top As Int
- Visible As Boolean
- Width As Int
B4X:
SwitchButton1.ThumbDrawableRes = "flyme_thumb_drawable"
SwitchButton1.BackDrawableRes = "flyme_back_drawable"
SwitchButton2.BackDrawableRes = "ios_back_drawable"
SwitchButton3.ThumbDrawableRes = "miui_thumb_drawable"
SwitchButton3.BackDrawableRes = "miui_back_drawable"
SwitchButton4.ThumbDrawableRes = "icon_github"
SwitchButton5.ThumbDrawableRes = "ios_back_drawable"
Attachments
Last edited: