Now I am doing an application.In my app I have to change textview value on every second.like 1,2,3,4,5,etc.and I have to stop the value on 10th second.I got the code from . update ui on intervel
But I didnt understand this.Pls provide me a simple code to change the textview value and stop on a particular time.Please help me friends.Thanks in advance.
Try like this..
EditText t1=(EditText)findVieById(R.id.edittext1);
counter= new CountDownTimer(10000,1000);
counter.start();
@Override
public void onFinish() {
}
@Override
public void onTick(long millisUntilFinished) {
long s1=10-(millisUntilFinished)/1000;
t1.setText(s1);
}