Here is the link where i have discussed about a countdown timer of format(mm:ss) in Java:
Java console code for StopWatch/Timer?
Now i want to display (and u
You can also use the CountDownTimer class available in android.
Just declare a constructor and start the timer with
timer test=new timer(30000,1000);
onTick will get fired once in every 1000ms in the above case. You can update your TextView from here
class timer extends CountDownTimer
{
public timer(long millisInFuture, long countDownInterval)
{
super(millisInFuture, countDownInterval);
// TODO Auto-generated constructor stub
}
@Override
public void onFinish()
{
}
@Override
public void onTick(long millisUntilFinished)
{
// TODO Auto-generated method stub
// Update your textview on on tick
}
}