Gauge and Dial widget for Android

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.


    Advertisement
    This entry was posted in Post Android, Uncategorized, User Interfaces and tagged , , , , , , , , . Bookmark the permalink.

    13 Responses to Gauge and Dial widget for Android

    1. Ivan says:

      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 :)

    2. Pingback: Mind The Robot » Android UI: Vintage Thermometer – Code Update

    3. Looks great. Any chance we get to have a look at the code as well?

      • atstechlab says:

        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

    4. 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.

    5. C L says:

      Great looking dial widget. Would love to use that in a demo for polling a database and displaying summary metrics.

    6. Pingback: Gauge widget available at Google Code | ATS TechLab

    7. MiloTheGreat says:

      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.

    8. Jay Vaughan says:

      Any idea when the code for this project will be available?

    Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Connecting to %s