Android UI: Vintage Thermometer – Code Update

After I had posted the original article about making a vintage Android thermometer, it became popular very quickly and I was really surprised how useful some people found it. The code I wrote for that article was meant as an example, a draft of what you could really do using the techniques described in the post.

Freddy Martens from ATS Tech Lab took that code, improved it and modified it for his needs while creating several industrial automation components based on the improved code of Vintage Thermometer. You can have a look at them here. I recommend reading other articles on their blog as well and keeping an eye on it.

However, what Freddy also did as a big favor for me and for you MTR readers was merging his improvements to the original Vintage Thermometer code without changing its overall functionality. Thanks to that, we now have the following features:

  • Comments in the code – I myself am not very famous for writing a lot of them
  • “Magic” numbers extracted as constants (and other things Freddy did to polish the code)
  • Properties are now available so you can tweak thermometer settings in the layout XML!

I am really excited by what Freddy did, and in general how we can collaborate within the community and benefit each other. This kind of interaction is what brings life to the platform biosphere. This is what I’m doing MTR for.

Grab the code here: thermometer-freddy.zip

Tags: , , , , , , ,

5 Responses to “Android UI: Vintage Thermometer – Code Update”

  1. [...] This post was mentioned on Twitter by Donn Felker, Ivan Memruk. Ivan Memruk said: Android UI: Vintage Thermometer – Code Update http://su.pr/1A1Nc1 [...]

  2. Hi Ivan,

    It was a pleasure working with the Thermometer :-)

    Freddy

  3. Dear Freddy Martin and Ivan,

    The vintage thermometer and its update has helped me a lot understanding the custom controls of Android, and I am very grateful to you for it . Keep up the good work. Looking forward for more thought provoking articles. Cheers

    Regards,
    Shahab Hameed

  4. ivan says:

    Glad our work has been useful!

  5. Can you tell me how to rotate the scale text ? I want to rotate the number of the scale text to straight for easy view ?

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>