The clock text Textclock inherits from TextView, which is the text box that is used to display the current time.
XML attributes and related methods supported by Textclock
|
XML Properties |
Related methods |
Description |
|
Android:format12hour |
Setformat12hour (charsequence) |
Set The format string for a system of hours |
|
Android:format24hour |
Setformat12hour (charsequence) |
Set The format string for a system of hours |
|
Android:timezone |
Settimezone (String) |
Set the time zone of the clock |
The analog clock analogclock inherits from the view component, overriding the view 's OnDraw method, Draws an analog clock that displays the current time.
XML attributes and related methods supported by AnalogClock
|
XML Properties |
Related methods |
Description |
|
Android:dial |
|
Set the picture used for the dial |
|
Android:hand_hour |
|
Set the picture to be used by the hour |
|
Android:hand_minute |
|
Set the picture used by the minute hand |
The timer chronometer inherits from TextView, displaying a text box that starts at a certain time and passes through the time.
The supported properties are Android:format used to specify the timing format of the timer.
The relevant methods are as follows:
SetBase (long Base): Sets the start time of the timer
SetFormat (String format): Sets the format of the display time
Start (): Start timing
Stop (): Stop timing
Setonchronometerticklistener (Chronometer.onchronometerticklistener listener);
Binds the event listener to the timer, but triggers the listener when the timer changes
Android Thoughts (20): Clocks (AnalogClock and Textclock) and timers (chronometer)