Code Monkey home page Code Monkey logo

leonclock's Introduction

将其添加到根build.gradle中

allprojects { 
     repositories {
     ... 
     maven { url 'https://jitpack.io' } 
     }
 }

添加依赖项

dependencies{
    implementation'com.github.yoakerin:LeonClock:v1.0.1'
}

使用

<com.yoake.clock.LeonClockView
        android:layout_width="200dp"
        android:layout_height="200dp"/>

支持的属性

    app:hour_hand_percent
    <!--分针占表盘半径的百分比-->
    app:minute_hand_percent
    <!--秒针占表盘半径的百分比-->
    app:second_hand_percent
    <!--表盘背景 BitmapDrawable 或者 ColorDrawable-->
    app:clock_background
    <!--表盘轮廓线颜色 默认是没有的-->
    app:clock_outline_color
    <!--时刻线颜色 每15秒-->
    app:main_tick_color
    <!--时刻线颜色 每5秒-->
    app:second_tick_color
    <!--时刻线颜色 每1秒-->
    app:third_tick_color
    <!--时针颜色-->
    app:hour_hand_color
    <!--分针颜色-->
    app:minute_hand_color
    <!--秒针颜色-->
    app:second_hand_color
    <!--0时刻字符-->
    app:time_zero_text
    <!--3时刻字符-->
    app:time_three_text
    <!--6时刻字符-->
    app:time_six_text
    <!--9时刻字符-->
    app:time_nine_text
    <!--0369字符颜色-->
    app:time_text_color

leonclock's People

Contributors

yoakerin avatar

Stargazers

Xiao Dan avatar dev avatar  avatar  avatar  avatar  avatar  avatar Jon avatar Micro·J avatar  avatar  avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.