tags:

views:

289

answers:

1

I'm working on an Android Application for AutiPlan, which is a web-based planner tool for people with an Autism-related disorder.

I want to create an application which shows the current activity (planned item), together with a clock. (AnalogClock) On this clock, I want to paint a red background from the current-minute to the minute at which the activity ends.

To clarify, if it is now 12:00 and the current activity ends at 12:15, the right-top quarter of the circle that makes out the analog clock is red. This has to be updated every minute, so that it is clear how much time is left for the current activity. (The red section gets smaller each minute).

Also, (question 2) I want to use AnalogClock to display a small (stationary) clock with the time that the next activity starts. Can I set the time of the object so it displays a specific time?

Thank you very much, Ger.

+2  A: 

Regarding "question 2", not with the standard AnalogClock.

Regarding what I presume is "question 1" (can you paint those things on the AnalogClock), probably not with the standard AnalogClock.

In both cases, I suspect you want to create your own clock, perhaps using the AnalogClock source code as a basis. For your "question 1", you may be able to get away with just a subclass. For "question 2", getting the current time is a large chunk of the AnalogClock code, so you will probably need to create a separate clock class.

CommonsWare
Thanks, I have looked at the class. I think I can create a subclass that does what I want.Thanks again,Ger.
Hi,The link in the code is probably the android 2.0 widget. I've tried finding the android 1.6 code for this, but failed miserably.I want to override some methods, but need the original code for that. Could anyone point me in the correct direction? I've literally googled for hours.Thanks, Ger.