Hi I am new in android and in my app I have a lot of images in my ArrayList that \'s
why I want to swipe those images automatically for every 3 seconds with he
try this code: In MainActivity -
int currentIndex=0; //for tracking current item
Create and set your TimerTask as per your requirement then in run() of TimerTask:
public void run() {
if((currentIndex+1)>imageId.length() ){
currentIndex=0;
}else{
currentIndex++;
}
ViewPager.setCurrentItem(currentIndex);
}