B4A Library LGauges - Gauges generation [Library] [Open Source Code]

NEW: Liberation of LGauges source code in the post #35


The purpose of the library LGauges, is simply to show gauges for measurement.

Attention: you need to load the library Base64Image, to use LGauges

LGauges
Author:
Vampirbcn
Version: 2.0

LGauges
Methods:
Initialize (thepanel As Panel, x As Int, y As Int)
-Initialize the object
SelectGauge(model as int)
-Select gauge dessign
SetTBorder(Thickness As Int)
-Set the gauge border width
SetSize(Thesize As Int)
-Set the gauge size
ActivateBorderAutoColor(activate as boolean)
-Enable or disable the automatic generation of color on the border
SetBorderColor(Thecolor As Int)
-Set the fixed border color
SetHandColor(Thecolor As Int)
-Set the hand color
SetValuesColor(Thecolor As Int)
-Set the color of values of gauge
SetFirstValue(value As Int)
-Set the first number of the displayed values
SetLastValue(value As Int)
-Set the last number of the displayed values
ChangeValue(value As Int)
-Change the value represented by the hand

Image examples:

imagen1.jpg imagen2.jpg imagen3.jpg

Example code:
B4X:
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
    Dim thegauge As LGauges

    Dim Panel1 As Panel
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("Main")
    thegauge.Initialize(Panel1,40,40)
    thegauge.SelectGauge(1)
End Sub



-. Sorry for my bad English. -
 

Attachments

  • LGauges.zip
    111.8 KB · Views: 1,117
  • GaugesExample.zip
    294.4 KB · Views: 1,073
Last edited:

Afsal

Member
Licensed User
Longtime User
Hello sir


Please find the attached code

, and let me know if I done something wrong


upload_2013-10-12_13-4-53.png
 

Attachments

  • guage tut.zip
    281.8 KB · Views: 289

Afsal

Member
Licensed User
Longtime User
I done as per your suggestion but the result same like before the app is forced to close.
upload_2013-10-12_13-46-55.png
 

ciprian

Active Member
Licensed User
Longtime User
Working fine for me. It's just that i have core version 3 (cause i'm using beta 8 version 3 of b4a).
Are you copiling into a simulator or a real device?
What version of b4a are u using?
 
Last edited:

Afsal

Member
Licensed User
Longtime User
I am Using B4A (Standards)2.52 and I tried Both emulator and real device (Samsung GT9070) but the result is same.

Can I get the link of beta version Once I succeed I can Buy Enterprises Version



thanks

Afsal
 

ciprian

Active Member
Licensed User
Longtime User
You have another problem...the first example is working great. You must have a problem with your b4a install or sdk or java.
I can't find another explanation. Sorry.

Best Regards.
 

Afsal

Member
Licensed User
Longtime User
the BT serial example is working great for me, if there is any issue with B4A or sdk installation the BT example is work well?
 

Quaki

Member
Licensed User
Longtime User
I have the same problem (and the same version of B4A). So The problem is the into old version of B4A I think
I will upgrade B4A soon (as soon as I recive the link to new version from Erel) then I will try again
Best regards
 

fabio.guerrazzi

Member
Licensed User
Longtime User
Core 3.80
Base64Image 1.00
Dialogs 2.92
LGauges 1.00

Compiling the example got this below: (thank you for answers)

Parsing code. 0.00
Compiling code. 0.30
Compiling layouts code. 0.00
Generating R file. 0.02
Compiling generated Java code. 0.78
Convert byte code - optimized dex. 0.57
Packaging files. 0.11
Copying libraries resources Error
Impossibile trovare il file 'C:\0\GaugesExample\Objects\bin\temp.ap_.521.tmp'.


UPDATE: found the bug (not solved). it's not a Guage issue, rather the Dialogs lib. Any help would be appreciate
 
Last edited:

vampirbcn

Active Member
Licensed User
Longtime User
LIBERATION OF SOURCE CODE: LGauges v:1.0

I hope the liberation of the source code LGauges, allow the development of this library.

I hope that any changes that made the members of this community, are also published in open source format


IMPORTANT:
Remove te last .zip from names of files, before unzip.
 

Attachments

  • LGauges.zip.001.zip
    488.3 KB · Views: 402
  • LGauges.zip.002.zip
    488.3 KB · Views: 360
  • LGauges.zip.003.zip
    488.3 KB · Views: 427
  • LGauges.zip.004.zip
    34.6 KB · Views: 350
Top