Skip to content

chenglei1986/ClockView

Repository files navigation

ClockView

A ClockView for Android 4.0+.

screenshot

Usage

You can use ClockView in you xml files just like this:

<com.github.chenglei1986.clock.ClockView
    android:layout_width="200dp"
    android:layout_height="200dp"
    app:animation="true"
    app:centerCircleColor="#D31231"
    app:centerCircleRadius="5dp"
    app:clockFaceColor="#A9ADB0"
    app:hourHandColor="#000000"
    app:hourHandWidth="5dp"
    app:innerRimColor="#333333"
    app:innerRimWidth="1.5dp"
    app:minuteHandColor="#333333"
    app:minuteHandWidth="3dp"
    app:numberTextColor="#333333"
    app:numberTextSize="16dp"
    app:numberType="arabic"
    app:outerRimColor="#333333"
    app:outerRimWidth="2dp"
    app:showNumbers="true"
    app:showSweepHand="true"
    app:showThickMarkers="true"
    app:showThinMarkers="true"
    app:sweepHandColor="#D31231"
    app:sweepHandWidth="1dp"
    app:thickMarkerColor="#333333"
    app:thickMarkerWidth="3dp"
    app:thinMarkerColor="#333333"
    app:thinMarkerWidth="1dp"
    app:timeZoneId="GMT+8"/>

But I think you would prefer to clone the source code, so that you can modify the code to fulfill your own requirements.

License

MIT License

Copyright (c) 2016 Darren

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

A ClockView for Android 4.0+.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages