zoukankan      html  css  js  c++  java
  • colock

    <?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
  • 相关阅读:
    在安装了Anaconda+Pycharm怎么导入OpenCV
    JS--ECMAScript
    JS--DOM
    JS-BOM
    浮动 高度塌陷
    CSS2--字体样式
    CSS2--文本样式
    css2--垂直对齐
    css2--背景
    HTML基础
  • 原文地址:https://www.cnblogs.com/superxuezhazha/p/11477956.html
Copyright © 2011-2022 走看看