0

The Chronometer widget initial text is 00:00

but when I start the Chronometer its text becomes blank

How can I display the text of the Chronometer as it counts up ?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Mina Wissa
  • 10,923
  • 13
  • 90
  • 158
  • @Ikke: no, it's not. The chronometer widget is something used in code. @Mina: please show us your xml and/or code. It shouldn't disappear like that so you must have done something wrong. – Steve Haley Apr 13 '10 at 07:47
  • @Steve H Ok, thought it was just an android desktop widget – Ikke Apr 13 '10 at 08:01
  • Hi guys its just a chronometer widget and I have a button that when I click i start the chronometer note: I didn't set the format of the chronometer, could this be the reason – Mina Wissa Apr 13 '10 at 08:36
  • You shouldn't need to set a format. It defaults to haveing a dark background, white text and about 10px high text. You need to show us how you've actually implemented this because by your description you haven't done anything wrong, but we'll probably be able to see the fault if we see your code and XML. Alternatively, you can have a look at this question where I went into detail explaining to someone how to make a custom chronometer: http://stackoverflow.com/questions/2536882/create-an-incrementing-timer-in-seconds-in-0000-format/2537264#2537264 – Steve Haley Apr 13 '10 at 10:34

1 Answers1

0

Ok guys

thanks for your help

I didn't implement the setOnChronometerTickListener listner and didn't handle the

onChronometerTick

method to display the current value of the ChronoMeter

Mina Wissa
  • 10,923
  • 13
  • 90
  • 158
  • You don't necessarily need to do those - assuming you are talking about the example I posted, that's only if you want to do something complicated with the Chrono widget. Normally just a simple in your XML followed by a `Chronometer chrono = (Chronometer) findViewBy...` and `chrono.start()` in your code is all you need. – Steve Haley Apr 14 '10 at 10:20
  • Thanks steve what I wanted to do is to make the Chronometer text updates as time elapses – Mina Wissa Apr 14 '10 at 15:56