首页 > 其他 > 详细

colock

时间:2019-09-06 21:02:31      阅读:105      评论:0      收藏:0      [点我收藏+]

技术分享图片

 

技术分享图片
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="vertical"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:gravity="center_horizontal">
    <!-- 定义模拟时钟 -->
    <AnalogClock
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>
    <!-- 定义数字时钟 -->
    <TextClock
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="20dp"
            android:textColor="#f0f"
            android:format12Hour="yyyy年MM月dd日 H:mma EEEE"
            android:drawableEnd="@mipmap/ic_launcher" android:drawableRight="@mipmap/ic_launcher"/>
    <!-- 定义模拟时钟,并使用自定义表盘、时针图片 -->
    <AnalogClock
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:dial="@drawable/watch"
            android:hand_minute="@drawable/hand"/>
</LinearLayout>
View Code

 

知识点:(划重点了)

第三个表盘和分针是一个图片

android:dial="@drawable/watch"
            android:hand_minute="@drawable/hand

 

colock

原文:https://www.cnblogs.com/superxuezhazha/p/11477956.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!