Android has its own clock UI component, AnalogClock and DigitalClock, respectively, for analog and digital clocks.
1.AnalogClock
You can customize the dial, hour and minute hand. As follows, just set it in the XML file.
<!--- <analogclock android:layout_width = "Wrap_content" android:layout_height= "Wrap_content" android:dial= "@drawable/ Watch " android:hand_minute=" @drawable/hand "/>
The effect is as follows, where the dial and minute hand are the default images used by the hour hand, using their own defined pictures
2.DigitalClock
It is also very simple to use, defined directly in XML, with the following code:
< DigitalClock Android:layout_width = "Wrap_content" android:layout_height= "wrap_content"/>
The effect is as follows, which means that the display will change as the system settings change:
System uses 12-hour display time
System uses 24-hour display time
The clock UI for Android development