[android-developers] imageview changing

2012-02-04 Thread Salih Selametoglu
package sample.deneme;

import java.util.Timer;
import java.util.TimerTask;
import android.content.Context;
import android.widget.ImageView;

public class imageS extends ImageView  {

private Timer _destroy;

public imageS(Context context) {
super(context);
// TODO Auto-generated constructor stub

_destroy = new Timer();

_destroy.schedule(new TimerTask() {

@Override
public void run() {
// TODO Auto-generated method stub
setBackgroundResource(R.drawable.ic_launcher);
}
}, 5000, 5000);
}
}

i use this cod but not changing. What is wrong?

-- 
Salih SELAMETOĞLU
Teknopalas RFID Yazılım Çözümleri / Yazılım Uzman Yardımcısı
İstanbul Üni. Bil. Müh. 4. Sınıf
http://www.linkgizle.com
http://selametoglu.blogspot.com/
http://slideme.org/application/light-show (first application)

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


Re: [android-developers] imageview changing

2012-02-04 Thread Farhan Tariq
why do you need write a whole new class just to change image on an
imageView? If this is all that you need to do, just set imageView's
background drawable... something like this

while(true){
   imageView.setBackgroundDrawable(R.drawable.something);
   Thead.sleep(5000);
}



2012/2/4 Salih Selametoglu barbooni...@gmail.com

 package sample.deneme;

 import java.util.Timer;
 import java.util.TimerTask;
 import android.content.Context;
 import android.widget.ImageView;

 public class imageS extends ImageView  {

private Timer _destroy;

public imageS(Context context) {
super(context);
// TODO Auto-generated constructor stub

_destroy = new Timer();

_destroy.schedule(new TimerTask() {

@Override
public void run() {
// TODO Auto-generated method stub

  setBackgroundResource(R.drawable.ic_launcher);
}
}, 5000, 5000);
}
 }

 i use this cod but not changing. What is wrong?

 --
 Salih SELAMETOĞLU
 Teknopalas RFID Yazılım Çözümleri / Yazılım Uzman Yardımcısı
 İstanbul Üni. Bil. Müh. 4. Sınıf
 http://www.linkgizle.com
 http://selametoglu.blogspot.com/
 http://slideme.org/application/light-show (first application)

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

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