B4A Library Android-Speedometer

The attached project wraps this Github project. Library files are in the /files folder of the B4A project. Copy them to your additional Library folder. You will also need android-support-v4.jar to be in your additional library folder. Also posting the java source code (src.zip). In order to compile the java code you will need to add a folder called libs on the same folder level as what the src folder is and then copy android-support-v4.jar into that libs folder. The right bottom "speedometer" indicates my device's battery level as it is at present.

2.png



Library as it stands at present:

androidspeedometer
Author:
Johan Schoeman
Version: 1
  • Speedometer
    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
    • Color As Int [write only]
    • CurrentSpeed As Float
    • Enabled As Boolean
    • Height As Int
    • Left As Int
    • MaxSpeed As Float [write only]
    • OffColor As Int [write only]
    • OnColor As Int [write only]
    • ReadingTextShadowColor As Int [write only]
    • ScaleColor As Int [write only]
    • ScaleTextShadowColor As Int [write only]
    • ScaleTextSize As Float [write only]
    • Tag As Object
    • TheReadingTextColor As Int [write only]
    • TheReadingTextSize As Float [write only]
    • Top As Int
    • Visible As Boolean
    • Width As Int
 

Attachments

  • b4aAndroidSpeedometer.zip
    16.6 KB · Views: 421
  • src.zip
    5.9 KB · Views: 372
Last edited:
Top