It wasn’t hard at all creating my own widget for Android. The Vintage Thermometer created by Ivan (the guy from MindTheRobot.com) served as a starting point for my widget. First I removed the sensor specific part from the code and added getters and setters to be able to pass any value I like to the widget. The second step was adding a significant amount of comment to the code. The third and last thing I did was making the widget more configurable. The result is given below.
As said, the widget is configurable. Most of what you see in the image above can be configured in the layout file. The following properties are available:
- Widget type: gauge, dial or both.
- Enabling the extra colored ring indicating ranges scale ranges.
- Setting the 3 individual colors of the gauge.
- Setting the scale limits.
- Setting the min and max values for each range.
- Setting the increments for each large and small notch.
I will make the binary version available soon. Please check back later.
Because Ivan was very helpfull, I decided to update his code also. I’ve added properties and inline comments to his source code. Please check Mind the Robot for updates on the Vintage Thermometer. Also check that site for other Android related items.
Great job Freddy!
It’s really a new professional level for that simple piece of code that I wrote.
Hope to see it in apps
Well ivan, you provided a good foundation
Pingback: Mind The Robot » Android UI: Vintage Thermometer – Code Update
Looks great. Any chance we get to have a look at the code as well?
Hello Manfred,
I need to find a way to share the widget in source or binary form and I also need to determine the license type. I will probably host this widget on Google somewhere.
Freddy
Cool. If you put it on google code as a project, it would be great if you could use mercurial/hg as repository format rather than svn. That way contributing is much easier. I look forward to have a peek.
Great looking dial widget. Would love to use that in a demo for polling a database and displaying summary metrics.
Pingback: Gauge widget available at Google Code | ATS TechLab
Great stuff, is there a demo app to use it in action? I’ll be interested if there is swing animation when the needle moves.
Thanks.
Any idea when the code for this project will be available?
It’s already available at http://code.google.com/p/widgets4androidhmi/source/checkout
Cheers
Hi Freddy , I found nothing here..
http://code.google.com/p/widgets4androidhmi/source/checkout
You need to check it out using a google account. If you want, I can try to create a zip and post it somewhere.