change textview value in a particular intervel

Go To StackoverFlow.com

0

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.

2012-04-04 07:45
by sarath
The link provided by you is the example / simple code itself - Tanmay Mandal 2012-04-04 07:48
have u need more than one time to stop or for single time - Khan 2012-04-04 08:52


1

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);

 }
2012-04-04 07:58
by 5hssba
Ads