blipinsk / FlippableStackView

An Android library introducing a stack of Views with the first item being flippable.
Apache License 2.0
809 stars 150 forks source link

How to show items in a loop? #2

Closed a-klimashevsky closed 9 years ago

a-klimashevsky commented 9 years ago

In a default implementation i cannot scroll out of bounds. How can I scroll items in a loop? For example: I have items 1,2,3,4. Now app shows item 4. I cannot scroll bottom (to item 1). How I can do it? In a OrientedViewPager there are checks for the first and the last items.

Thanks.

blipinsk commented 9 years ago

OrientedViewPager is just a regular ViewPager (management and operation wise). The only difference is that it lets you choose its orientation (VERTICAL or HORIZONTAL).

The whole library (FlippableStackView) is based on this ViewPager. There is no method in original ViewPager to make it loop through its children, therefore there is no default way to do that in FlippableStackView. To do that you have to implement looping yourself, just like you would for any ViewPager.