I have an extended CountDownTimer class and I want to be able to pass
an object (ImageView).

The reason I am wanting to pass the object is because I will be
calling this several times wanting different images to change.

Code:
        private void checkStatus() {

                getStatus network = new getStatus(5000, 1000, iNetwork);
                network.start();

                getStatus email = new getStatus(5000, 1000, iEmail);
                email.start();
        }


        public class getStatus extends CountDownTimer{
                public getStatus(long millisInFuture, long countDownInterval,
ImageView img) {
                        super(millisInFuture, countDownInterval);
                        }

                        @Override
                        public void onFinish() {
                                img.setImageResource(R.drawable.i_green);
                        }

                        @Override
                        public void onTick(long millisUntilFinished) {
                                img.setImageResource(R.drawable.i_gray);
                        }
        }

I'm getting an error stating that img cannot be resolved in both the
onFinsih() and onTick().

Thoughts?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to