views:

491

answers:

1

Hi all,

I want to create an AnalogClock that can display a preset time, given as a parameter.

And I want to draw between the background and the hands. I want to paint the area between the minute-hand and location of the hour-hand at a preset future time. This is to let the user see how much time remains for the current activity.

I thought that I could take the AnalogClock object and extend that. However, when I create a new function that is essentially a copy of one of the old ones, I get errors on the com.android.internal.R.styleable.AnalogClock* objects: "com.android.internal.R cannot be resolved"

How can I import these objects? I've read something about declare-styleable, but I cannot figure out how to apply that to my situation. (Sorry, I'm really a Java n00b)

For instance, the internal objects refer to several graphical things, such as dials, hour_hand and minute_hands.

Here's my code: http://pastie.org/713276

Any help is very much appreciated, I am stuck after hours of Google.

Thanks,

Ger.

+1  A: 

Here is an tutorial for creating a custom Analog Clock. Shows some sample code, hope this is at least a start in the right direction.

Anthony Forloney
Cool, can I use this also to display a custom clock within a program?
you might be able to, I know a little bit about Android but I cannot say for sure. You would probably have to make space for it inside of your AndroidManifest.xml file, like have a LinearLayout and display like a Button and then your Custom Clock
Anthony Forloney
Thanks a lot for pointing me in the right direction. I think this tutorial will get me through.. :)
Good luck, if you need anymore help just keep posting ;)
Anthony Forloney