先来看看效果图吧:

Android中的DigitalClock和AnalogClock

main.xml代码如下:

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 3     android:layout_width="fill_parent"
 4     android:layout_height="fill_parent"
 5     android:orientation="vertical" >
 6 
 7     <TextView
 8         android:layout_width="fill_parent"
 9         android:layout_height="wrap_content"
10         android:text="@string/hello" />
11 
12     <DigitalClock
13         android:id="@+id/digitalClock1"
14         android:layout_width="wrap_content"
15         android:layout_height="wrap_content"
16         android:text="DigitalClock" 
17         android:textSize="14px"/>
18 
19     <AnalogClock
20         android:id="@+id/analogClock1"
21         android:layout_width="wrap_content"
22         android:layout_height="wrap_content" />
23 
24 </LinearLayout>

相关文章:

  • 2021-12-03
  • 2021-12-18
  • 2022-12-23
  • 2021-12-09
  • 2021-11-27
  • 2022-12-23
  • 2021-05-17
猜你喜欢
  • 2021-04-13
  • 2021-04-08
  • 2021-08-30
  • 2021-08-16
  • 2021-09-03
  • 2021-07-11
相关资源
相似解决方案