开发者

Problem starting with chronometer

开发者 https://www.devze.com 2023-02-12 07:35 出处:网络
My开发者_如何学JAVA chronometer is always starting from 0:10 or like some other times... it s not starting from 0:01 itself..any one can help me

My开发者_如何学JAVA chronometer is always starting from 0:10 or like some other times... it s not starting from 0:01 itself..any one can help me

Thank you,


i got an answer

  final Chronometer chrono = (Chronometer)findViewById(R.id.chronometer);

  chrono.setBase(SystemClock.elapsedRealtime());
  chrono.start();

once it will help to others thank you,,


you can start chronometer any value you want using setBase method of chronometer.you can also calculate Elapsed Time during start and stop of chronometer

0

精彩评论

暂无评论...
验证码 换一张
取 消