[android-developers] Re: How does Chronometer work??

2012-01-20 Thread skink


rachana govilkar wrote:
 I did write this code but its of no use as my Chronometer is not
 getting displayed only.
 And hence this time ticking is not taking place.
 Do I need to add some code in code I mentioned above???



hmm, have you tried:

http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/ChronometerDemo.html

pskink

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How does Chronometer work??

2012-01-20 Thread rachana govilkar
hmm not yet.I will check it out.
Thanks for help.

On Jan 20, 1:00 pm, skink psk...@gmail.com wrote:
 rachana govilkar wrote:
  I did write this code but its of no use as my Chronometer is not
  getting displayed only.
  And hence this time ticking is not taking place.
  Do I need to add some code in code I mentioned above???

 hmm, have you tried:

 http://developer.android.com/resources/samples/ApiDemos/src/com/examp...

 pskink

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How does Chronometer work??

2012-01-19 Thread Brian Dols

before you call chrono.start(), try adding a tick listener:
chrono.setOnChronometerTickListener(new 
OnChronometerTickListener()
{

@Override
public void onChronometerTick(Chronometer 
chronometer) {
long elapsedTime = 
(System.currentTimeMillis() -
chronometer.getBase()) / 1000;
String currentTime = 
Utils.verboseTime(elapsedTime);
chronometer.setText(currentTime);
}
});

On Jan 18, 4:55 am, rachana govilkar rachana.govil...@gmail.com
wrote:
 Hello All,

 Using MediaRecorder I could capture Video.But I want to show timer to
 the user exactly same as it shown in
 built-in Camera app.
 So i implemented Chronometer logic

 private Chronometer chrono;
 chrono = (Chronometer)findViewById(R.id.chronometer1);
 chrono.setBase(SystemClock.elapsedRealtime());
 chrono.start();

 but no luck.

 Can anybody help me on this issue??

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How does Chronometer work??

2012-01-19 Thread rachana govilkar


On Jan 18, 4:16 pm, skink psk...@gmail.com wrote:
 rachana govilkar wrote:
  Hello All,

  Using MediaRecorder I could capture Video.But I want to show timer to
  the user exactly same as it shown in
  built-in Camera app.
  So i implemented Chronometer logic

  private Chronometer chrono;
  chrono = (Chronometer)findViewById(R.id.chronometer1);
  chrono.setBase(SystemClock.elapsedRealtime());
  chrono.start();

  but no luck.

  Can anybody help me on this issue??

 yiu didn't say what your issue is. no luck?

no luck is chronometer is not getting displayed and once it did but
its not showing me time.It just showed 00.00 all the time.

 pskink

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How does Chronometer work??

2012-01-19 Thread rachana govilkar
I did write this code but its of no use as my Chronometer is not
getting displayed only.
And hence this time ticking is not taking place.
Do I need to add some code in code I mentioned above???


On Jan 19, 7:41 am, Brian Dols brian.d...@gmail.com wrote:
 before you call chrono.start(), try adding a tick listener:
                         chrono.setOnChronometerTickListener(new 
 OnChronometerTickListener()
 {

                                 @Override
                                 public void onChronometerTick(Chronometer 
 chronometer) {
                                         long elapsedTime = 
 (System.currentTimeMillis() -
 chronometer.getBase()) / 1000;
                                         String currentTime = 
 Utils.verboseTime(elapsedTime);
                                         chronometer.setText(currentTime);
                                 }
                         });

 On Jan 18, 4:55 am, rachana govilkar rachana.govil...@gmail.com
 wrote:

  Hello All,

  Using MediaRecorder I could capture Video.But I want to show timer to
  the user exactly same as it shown in
  built-in Camera app.
  So i implemented Chronometer logic

  private Chronometer chrono;
  chrono = (Chronometer)findViewById(R.id.chronometer1);
  chrono.setBase(SystemClock.elapsedRealtime());
  chrono.start();

  but no luck.

  Can anybody help me on this issue??

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How does Chronometer work??

2012-01-18 Thread skink


rachana govilkar wrote:
 Hello All,

 Using MediaRecorder I could capture Video.But I want to show timer to
 the user exactly same as it shown in
 built-in Camera app.
 So i implemented Chronometer logic

 private Chronometer chrono;
 chrono = (Chronometer)findViewById(R.id.chronometer1);
 chrono.setBase(SystemClock.elapsedRealtime());
 chrono.start();

 but no luck.

 Can anybody help me on this issue??

yiu didn't say what your issue is. no luck?

pskink

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en