This example describes the Android DigitalClock component usage. Share to everyone for your reference, specific as follows:
The use of DigitalClock components is simple, first look at the effect of the picture:
DigitalClock only need to use this component in the layout file where the time is displayed, without having to instantiate it with Java code.
<?xml version= "1.0" encoding= "Utf-8"?> <linearlayout xmlns:android=
"http://schemas.android.com/apk/" Res/android "
android:orientation=" vertical "
android:layout_width=" fill_parent "
android:layout_" height= "Fill_parent"
>
<digitalclock
android:layout_width= "wrap_content"
android:layout_ height= "Wrap_content"
android:layout_gravity= "Center_horizontal"/>
</LinearLayout>
For more information about Android development interested readers can view the site topics: "Android Basic components Usage Summary" and "Android Development introduction and Advanced Course"
I hope this article will help you with the Android program.