TrueAnalogClock
TrueAnalogClock Programming Interface
Interfaces
BeforeDrawFaceListener
public Boolean onBeforeDrawFace(
Called before drawing the face image and allows to draw face or it's parts from code manually. Return true to disable default drawing.
AfterDrawFaceListener
public void onAfterDrawFace(
Called after drawing the face image and allows to draw face or it's parts from code manually.
BeforeDrawGlassListener
public Boolean onBeforeDrawGlass(
Called before drawing the glass image and allows to draw glass or it's parts from code manually. Return true to disable default drawing.
AfterDrawGlassListener
public void onAfterDrawGlass(
Called after drawing the glass image and allows to draw glass or it's parts from code manually.
Methods
public void setBeforeDrawFaceListener(
Sets BeforeDrawFaceListener.
public void setAfterDrawFaceListener(
Sets AfterDrawFaceListener.
public void setBeforeDrawGlassListener(
Sets BeforeDrawGlassListener.
public void setAfterDrawGlassListener(
Sets AfterDrawGlassListener.
public boolean isUseSystemTime(
Returns true if clock uses current system time, otherwise false.
public void setUseSystemTime(
If true the clock must use the current system time, otherwise the internal time is used (
public long getTime(
Returns current time in milliseconds (
public void setTime(
Sets internal clock time using the system current time.
public void setTime(
Sets internal clock time using the passed parameters.
public void setTime(
public void setTime(
public void setTimeOffset(
Sets time offset using passed values. TrueAnalogClock class does not keep the value and just sets time offset for all contained hands.
public void setTimeOffset(
public Bitmap getFace(
Returns current face image.
public void setFace(
Sets face image using passed bitmap or drawable resource id.
public void setFace(
public Bitmap getGlass(
Returns current glass image.
public void setGlass(
Sets glass image using passed bitmap or drawable resource id.
public void setGlass(
public void addHand(
Adds new hand to hands list.
public void removeHand(
Removes passed hand from hands list.
public void removeAllHands(
Removes all hands from hands list.
public void rearrangeHands(
Change the position of the passed hand in the hands list.
public int getHandCount(
Returns the count of the hands list.
public TrueAnalogClockHand getHand(
Returns the hands by the position in the hands list.
public Object[] findHands(
Returns the list of the hands that have the passed name.
public void loadFromXmlResource(
Loads the clock settings from the XML resource with passed resource id. XML resource must be placed to the res/xml folder.