にこのcode..itが完全に働いてみことを渡します。
/** For Images Slidshow. */
public int currentimageindex=0;
Timer timer;
TimerTask task;
ImageView slidingimage;
int[] IMAGE_IDS = {R.drawable.mic, R.drawable.mic5, R.drawable.mic6,
R.drawable.mice7};
//code of slideshow start from here
final Handler mHandler = new Handler();
// Create runnable for posting
final Runnable mUpdateResults = new Runnable() {
public void run() {
AnimateandSlideShow();
}
};
int delay = 1000; // delay for 1 sec.
int period = 8000; // repeat every 4 sec.
Timer timer = new Timer();
timer.scheduleAtFixedRate(new TimerTask() {
public void run() {
mHandler.post(mUpdateResults);
}
}, delay, period);
}
private void AnimateandSlideShow() {
slidingimage = (ImageView)findViewById(R.id.ImageView_id);
slidingimage.setImageResource(IMAGE_IDS[currentimageindex%IMAGE_IDS.length]);
currentimageindex++;
}
//code of slideshow ends here