本文實例講述了Android DigitalClock組件用法。分享給大家供大家參考,具體如下:
DigitalClock組件的使用很簡單,先看看效果圖:

DigitalClock只需要在布局文件中,用于顯示時間的地方使用此組件即可,無需用java代碼進行實例化。
<?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開發相關內容感興趣的讀者可查看本站專題:《Android基本組件用法總結》及《Android開發入門與進階教程》
希望本文所述對大家Android程序設計有所幫助。
新聞熱點
疑難解答
圖片精選