Time Keeps Flowing Like a River
If you want to display the time, rather than have users enter the time, you may wish to use the or widgets. These are extremely easy to use, as they automatically update with the passage of time. All you need to do is put them in your layout and let them do their thing.
For example, from the sample application, here is an XML layout containing both and :
Without any Java code other than the generated stub, we can build this project (see Figure 10‑4).
Figure 10‑4. The ClocksDemo sample application
Дата добавления: 2015-05-16; просмотров: 677;