Git Product home page Git Product logo

custom-analog-clock-view's Introduction

Hi there ๐Ÿ‘‹

I'm rosenpin
I make stuff

Twitter Follow

Many of my older projects moved to @rosenpin-deprecated so check it out if you're looking for something that used to be here

custom-analog-clock-view's People

Contributors

rosenpin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

custom-analog-clock-view's Issues

Seconds hand

Is it posible to implement seconds hand with this clock ?

Sweeping second hand animation

Hello!

I tried modifying the code so that a sweeping second hand effect could be achieved, similar to expensive watches like Rolex have. I know that I should animate the second hand, but don't quite know how to implement it.

First I tried setting the delay in:
public void setTime(Calendar calendar) { mCalendar = calendar; invalidate(); if (autoUpdate) { new Handler().postDelayed(new Runnable() { @Override public void run() { setTime(Calendar.getInstance()); } }, 1000); } }

to 250 instead of 1000 and modifying the updateHands() slightly so that second hand would update more often. Obviously 250ms was little bit too much and the second hand jumped weirdly.

I realized that animation is a better idea.
I looked at this example: https://stackoverflow.com/questions/13719890/how-to-make-android-sweeping-second-hand-on-analog-clock
but realized this widget is using canvas instead of ImageView and found out that a good way would be to use Matrix while animating. Something similar to this:
https://stackoverflow.com/questions/27832881/animate-rotation-of-an-image-in-android

Unfortunately I can't quite get it to work.
Any suggestions or pointers?

Make hands invisible

Thanks for this awesome widget! I am trying to change the hands' drawable resource after the widget is instantiated (using init()). I have created a blank resource file that I am trying substitute for either hand depending on some data. I can get the minute hand to change, however the hour hand is never visible. Is there a better way/any insight? Thank you again!

multiple clock for different time zone

how can I have multiple clock? one clock for my country and another one for some one else?
I test this :

Calendar c = Calendar.getInstance();
c.setTimeZone(TimeZone.getTimeZone("GMT+03"));
customAnalogClock.setTime(c);

and this :
customAnalogClock.setTimezone(TimeZone.getTimeZone("GMT+03"));

but none of theme worked

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.