模拟时钟(AnalogClock)和数字时钟(DigitalClock)

 

 

Demo2\clock_demo\src\main\res\layout\activity_main.xml

 1 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 2     xmlns:tools="http://schemas.android.com/tools"
 3     android:layout_width="match_parent"
 4     android:layout_height="match_parent"
 5     tools:context=".MainActivity"
 6     android:orientation="vertical"
 7     android:gravity="center_horizontal">
 8 
 9     <!--自定义模拟时钟-->
10     <AnalogClock
11         android:layout_width="wrap_content"
12         android:layout_height="wrap_content" />
13     <!--自定义数字时钟-->
14     <DigitalClock
15         android:layout_width="wrap_content"
16         android:layout_height="wrap_content"
17         android:textSize="30sp"/>
18 
19 </LinearLayout>

 

posted on 2015-07-23 19:58  姿含  阅读(1024)  评论(0编辑  收藏  举报