B4J Library [B4X] [XUI] xGauges and xGaugesRect Classes and Libraries

klaus

Expert
Licensed User
Longtime User
Last edited:

Scantech

Well-Known Member
Licensed User
Longtime User
This is from my Project Car Diagnostic Pro. I decided to share this with all of you.

This is a huge update to xGauges. Add ColorPallete to additional library.

I ask to upload any improvements. Thanks
 

Attachments

  • xGauges2.2.zip
    72.4 KB · Views: 554
Last edited:

klaus

Expert
Licensed User
Longtime User
I added a DrawArc routine in the class, replacing the drawing with paths.
You project works only with B4A it will not with with B4J.

It is also added in the original class which will be updated soon.
 

Attachments

  • xGauges2_21.zip
    66.8 KB · Views: 557

Scantech

Well-Known Member
Licensed User
Longtime User
Use BitmapCreator DrawArc. It fills lot better. Depending on color you may see imperfections filled with your example. If you have good eyes look at the attached photo. ScaleLow and ScaleHigh Colors are the same. ScaleLow is BitmapCreator and ScaleHigh is your DrawArc Example.
 

Attachments

  • DrawArc.png
    210.2 KB · Views: 563

tomi85

Member
Licensed User
Longtime User
I testing xgauges 1.5 and i have got error.

Error occurred on line: 140 (xGauges)
java.lang.RuntimeException: Cannot parse: null as boolean

the eror is in this line cNeedleON = Props.Get("NeedleON")

Do you have any idea? Im just download the demo and have this problem.
 

tomi85

Member
Licensed User
Longtime User
I try that and dont help.

I comment this line and is working but this is strange.
 

klaus

Expert
Licensed User
Longtime User
Which platform are you using?
I just tested the B4A version, got the error you mentioned, opened the Designer and closed it.
I got the message if I want save it, I answered Yes, and it worked.
If you still have the same problem, I will post an update tomorrow.
 

klaus

Expert
Licensed User
Longtime User

Diceman

Active Member
Licensed User
Klaus, your gauges look really nice and will give a professional touch to an application.
Have you given any thought to producing rectangular edgewise gauges? I mention this because some application will require several gauges on the screen at a time and the round gauges will take up a lot of screen space. The edgewise gauges take up less room and are stackable both vertically and horizontally. They could even be used in a CustomListView without taking up a lot of vertical space. Each item in the CustomListView would have their own gauge and text beside it describing what it is monitoring like "Outside Temp", "Room#1 Humidity", "Room#1 Temp" etc.. I have attached a few examples of edgewise gauges.
 

Attachments

  • EdgewiseGauges.jpg
    55.9 KB · Views: 298

Diceman

Active Member
Licensed User
I suppose that it is something like this what you are expecting.
Still need some more work.

View attachment 97815

Yes, your edgewise gauges look really good. The only suggestion I have is to allow the developer to choose the width &/or style of the pointer. Sometimes the pointer can get lost in the background so it should stand out. Maybe add a drop shadow to the pointer or a black outline around the pointer? Or a triangular pointer? There was a triangular pointer in one of the samples I uploaded. Apart from that minor improvement, I think you nailed it.
 

Diceman

Active Member
Licensed User
This is already in the to do list .

Great minds think alike. ROFL

The only other thing I can think of is an optional sliding set pointer like on a thermostat. I can see someone using these gauges to control a thermostat or humidifier and they would need to set the temperature on the face of the gauge. A real physical temperature gauge would have a metal pointer triangle that slides the full width of the scale but on the opposite side of the pointer so you would see what the temperature is set for and the actual reading from the temperature probe. If the equipment is working correctly the two should line up. At a glance you can see visually how well the equipment is working by comparing the distance from the set pointer and the actual pointer (temperature reading). Just a thought.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…