ongakuer / CircleIndicator

A lightweight indicator like in nexus 5 launcher
Apache License 2.0
4.27k stars 712 forks source link

Automatically slide to the next photo #81

Closed jaybxyz closed 7 years ago

jaybxyz commented 7 years ago

Is there a way to make image gallery(Let's say three photos) automatically slide to the next one?

From Photo#1 to Photo#2 after certain seconds, From Photo#2 to Photo#3 after certain seconds,

And Photo#3 to Photo #1 after certain seconds, From Photo#1 to Photo #2 after certain seconds, ,,,, ,,,, infinite

AlexanderIgnacz commented 7 years ago

+1

ongakuer commented 7 years ago

Infinite Sample https://github.com/ongakuer/CircleIndicator/blob/master/sample/src/main/java/me/relex/circleindicator/sample/fragment/LoopViewPagerFragment.java

AlexanderIgnacz commented 7 years ago

Yes, the loop viewpager is awesome but I wanted you to provide Auto-Play feature. Never mind. I used timer for sliding automatically at some intervals.

ongakuer commented 7 years ago

Create a Handler and invoke viewPager.setCurrentItem with postDelayed or sendMessageDelayed

AlexanderIgnacz commented 7 years ago

Alright, that's what I did. :)