android-viewflow icon indicating copy to clipboard operation
android-viewflow copied to clipboard

How to Auto Scroll

Open pangff opened this issue 12 years ago • 3 comments

I use ViewFlow in my application as an image gallery. And I want the image can scroll automatically. So I start an thread to invoke setSelection method, but I can not get the scroll animation。Then I set the startScroll scroll duration to 2000ms in setVisibleView method .But, It seems only the first view to second view has the scroll animation. What can I do to realize auto scroll with viewflow library?

pangff avatar Oct 23 '12 10:10 pangff

i need this thing too. is it possible?

Tooto avatar Feb 04 '13 13:02 Tooto

Hi, this can autoscroll modifying the PRIVATE method postViewSwitched(int direction) [when direction > 0 is to the right, direction < 0 is to the left and direction = 0 just returns]. Can change it to PUBLIC or use it on OTHER FUNCTION. You may have to do some validations (i think), but this is working nice for me.

superlandero avatar Feb 22 '13 19:02 superlandero

Can you give me code snippet for this? I found method "postViewSwitched(int direction) " but don't know how to add animations.

Thanks.

configurer avatar Jan 02 '15 08:01 configurer