android - ImageSlider Using Thread -


i want slider in imageview gives me 1 image @ time if 1 of have solution please tell me.

here in activity class.

images come api , there whole path of every image , web url

  arraylist<string>  imagepath1 = i.getextras().getstringarraylist("event_photo"); (int i1 = 0; i1 < imagepath1.size(); i1++) {         stockarr = new string[imagepath1.size()];         stockarr = imagepath1.toarray(stockarr);     //  imagepath = stockarr.tostring();         string imagepath = stockarr[i1];      } if (!textutils.isempty(imagepath)) {         if (imagepath.endswith(".jpeg") || imagepath.endswith(".jpg")                 || imagepath.endswith(".gif") || imagepath.endswith(".png")) {             imageloader = new imageloader(mcontext);              mupdateresults = new runnable() {                 public void run() {                     animation rotateimage = animationutils.loadanimation(                             getapplicationcontext(), r.anim.alpha);                      (int i2 = 0; i2 < stockarr.length; i2++) {                         imageloader.displayimage(imagepath1.get(i2),                                 imagetop);                      //  imagetop.startanimation(rotateimage);                         /*imagetop.setimageresource(number[currentimageindex                                 % stockarr.length]);*/                      }                  }             };             final handler mhandler = new handler();             int delay = 500; // delay 1 sec.             int period = 5000; // repeat every 4 sec.             timer timer = new timer();             timer.scheduleatfixedrate(new timertask() {                 public void run() {                     mhandler.post(mupdateresults);                 }             }, delay, period);            } else {          }     } 

please if 1 have solution


Comments