0

i created a function to rotate the view pager to make it swipe from right to left, as the following:

    public void rotateViews(View view){
        view.setRotationY(180);
    }

but the internal views will be rotated so i rotate them too, so in this case i can start from right to left, is there is a better way to do.

some people says to use viewPager.setCurrentItem() but this will not work in my case, because i want to start from the first position not the last one.

  • 1
    try this. – D.J Oct 18 '16 at 08:54
  • sorry that's not working in my case, because setCurrentItem() i have to put the last position of my viewer right? what i want is when i swipe to (from right to left) the position will be incremented not decremented. – Salah Owaidah Oct 18 '16 at 09:22

1 Answers1

0

try this its works set current page to the last page using this code

 viewPager.setCurrentItem(). 
Nitesh Pareek
  • 362
  • 2
  • 10