TrueAnalogClock Overview

How this class works?

First of all - the class calculates the drawing area from the face image's size and proportions, so the face image is required. The drawing area always is maximized and centered within the view bounds.

Then TrueAnalogClock class draws all the hand with "underFace" attribute. These hands can be used for supporting all the under-face indicators, like day, date, jumping hours and so on. Then the face is drawing and then class draws all the regular hands without "underFace" attribute. TrueAnalogClock also can draw the shadows of hands automatically, just define hand's "shadow", "shadowColor", "shadowOffset" and "shadowBlurRadius" attributes.

After hands drawing TrueAnalogClock can draw glass layer that can be used for drawings bezel, shadows and hotspots over the face and hands. The glass attribute is optional.

In clock you can use current system time with any custom offset for world time or set time manually using special methods.

All the hands is stored in the internal list and you can get any hand by its index or find the hand by its name. Of course, you can reorder list, add and delete any hand at runtime from your code.

The clock can be initialized from the code as well as loaded from XML resource, located in the "res/xml" using loadFromXmlResource method.