2

I want to loop my Viewpager and Im using the PagerAdapter extension. Everything I found in the net was an example with Fragments.

I want to solve this with a normal pageradapter. So When I Swipe from 1st view to left I want to be in the last View , and when I swipe from last view to right I want to change to 1st.

How can I solve this in an easy way (maybe without any libaries) ?

Farhad
  • 12,178
  • 5
  • 32
  • 60
Ahmet K
  • 713
  • 18
  • 42

2 Answers2

0

You can use the viewpager's setCurrentItem() method for achieving such functionality. This method takes the position (zero-based) of the view you want to navigate to.

Farhad
  • 12,178
  • 5
  • 32
  • 60
0

https://github.com/TobiasBuchholz/CircularViewPager I used this library, but there some problems in it when you try to show many circular views simultaneously