开发者

Display timer while Audio Recording in Android

开发者 https://www.devze.com 2023-04-04 16:54 出处:网络
I 开发者_如何学Pythonam new in Android. I want to make one Audio Recording application. In that when I Click on start button then in textView I want to display timer. For example, I want to display li

I 开发者_如何学Pythonam new in Android. I want to make one Audio Recording application. In that when I Click on start button then in textView I want to display timer. For example, I want to display like this way:- 1.20 or 2.30...

Can any one help me for displaying timer?

I know this is not a big question but I dont understand the concept of timer in the way I want to used in my application.

Please guide me anybody.

Thanks.


For this purpose try Android Chronometer Class, Its much more simpler than inventing your own

A very basic example is given here


you can use CountDownTimer for this ::

  CountDownTimer cntr_aCounter = new CountDownTimer(3000, 1000) {
        public void onTick(long millisUntilFinished) {

         // recodeing code 
        }

        public void onFinish() {
            //finish action
        }
        };cntr_aCounter.start();
0

精彩评论

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

关注公众号