本文實例講述了android digitalclock組件用法。分享給大家供大家參考,具體如下:
digitalclock組件的使用很簡單,先看看效果圖:
digitalclock只需要在布局文件中,用于顯示時間的地方使用此組件即可,無需用java代碼進行實例化。
1
2
3
4
5
6
7
8
9
10
11
|
<?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> |
希望本文所述對大家android程序設計有所幫助。