rparkins999 / AndroidSecondsClock

Android clock with seconds, both widget and fullscreen
GNU General Public License v3.0
7 stars 1 forks source link

Analog Clock #2

Open ghost opened 2 years ago

ghost commented 2 years ago

Could you add an option for the clock to be analog?

rparkins999 commented 2 years ago

I've thought about this, but it's a lot of work to do. Widgets cannot contain any View, only RemoteViews. RemoteViews used to allow both an analog clock and a digital clock, but the analog clock is now deprecated and it is likely to be withdrawn in a future Android version. The only way that I can think of to do it is to make the widget contain an ImageView, and replace the image every tick. This means that the Widget controller has to either contain a complete set of 43,200 images for all the possible seconds, or calculate a new View every tick.

Of course anyone who wants an analog clock is welcome to fork and write the code. I'll accept a pull request if it's done properly.