Display timer while Audio Recording in Android
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();
精彩评论