B4A Library LEDView

This is a wrap for this Githubproject.

LEDView
Version:
1
  • LEDView
    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)
    • initLED (str As String, ledColor As Int, ledTextSize As Int, ledPixel As Int)
    • run
    Properties:
    • Background As Drawable
    • Color As Int [write only]
    • Enabled As Boolean
    • Height As Int
    • LEDColor As Int [read only]
    • LEDText As String [read only]
    • Left As Int
    • Padding()() As Int
    • Parent As Object [read only]
    • Tag As Object
    • Top As Int
    • Visible As Boolean
    • Width As Int

Attached:
LedViewEx.zip The Example
LEDViewVx.x.zip The Library (copy the content to your additional libs folder)
Java source

Unfortunately the lib (Github-project) does not provide much properties.
And i dont know how to change the speed or to stop the animation...
 

Attachments

  • java-src.zip
    4.2 KB · Views: 387
  • LEDViewV1.0.zip
    9.4 KB · Views: 461
  • LEDViewEx.zip
    7.8 KB · Views: 456
Last edited:

Didier9

Well-Known Member
Licensed User
Longtime User
I found the problem. Apparently the Designer will not let you remove a layout that it cannot load. I thought I had removed the old layout but in fact it was not removed.

That may be a bug, or at least an "unexpected feature" :)

So I created a new project, simply copying the activity to the new project and creating a layout for it with the button and the LEDView and that worked, even with android.jar version 16.
 
Top