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 Faghihi
  • 9,874
  • 5
  • 27
  • 55
Ahmet Kazaman
  • 684
  • 13
  • 29

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 Faghihi
  • 9,874
  • 5
  • 27
  • 55
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