B4A Library RingButton

The attached project wraps this Github project. It is a two-in-one button. The top and bottom half of each button act as individual buttons. The top and bottom of each button will raise separate events in B4A when clicked.

The library files (including android-support-annotations.jar) are in the /files folder of the B4A project. Copy them to your additional library folder. Also posting the java source code in lib.zip.

1.png



The lib as it stands at present:

ringbutton
Author:
Johan Schoeman
Version: 1
  • RingButton
    Fields:
    • ba As BA
    Methods:
    • 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)
    Properties:
    • Background As Drawable
    • BorderColor As Int [write only]
    • BorderWidth As Int [write only]
    • CircleColor As Int [write only]
    • Color As Int [write only]
    • DividerColor As Int [write only]
    • DividerHighLightColor As Int [write only]
    • DividerShadowColor As Int [write only]
    • DividerSize As Int [write only]
    • DownBitmap As Bitmap [write only]
    • DownText As String [write only]
    • Enabled As Boolean
    • Height As Int
    • Left As Int
    • PressedColor As Int [write only]
    • Tag As Object
    • Top As Int
    • UpBitmap As Bitmap [write only]
    • UpText As String [write only]
    • Visible As Boolean
    • Width As Int
 

Attachments

  • b4aRingButton.zip
    52.9 KB · Views: 326
  • lib.zip
    29.8 KB · Views: 373
Top