Answers for "automatic slide viewpager android"

0

automatic slide viewpager android

Handler handler = new Handler();

Runnable timeCounter = new Runnable() {

        @Override
        public void run() {
                 if((currentIndex+1)>imageId.length() ){
                      currentIndex=0;
                  }else{
                      currentIndex++;
                 }
                ViewPager.setCurrentItem(currentIndex);
                handler.postDelayed(timeCounter, 3*1000);

        }
    };
handler.postDelayed(timeCounter, 3*1000);
Posted by: Guest on January-12-2021

Code answers related to "automatic slide viewpager android"

Browse Popular Code Answers by Language