ahmad
ahmad

Reputation: 2209

Android Controlling ViewPager Scroller

I have a horizontal viewpager with 5 views. I am trying to create a visual tutorial using parallaxing effects. I need to take control of the viewpagers srolling so I can tell the view to not scroll but still have an offset so I can move the images then resume scrolling when both images are in place.

Any ideas on how to achieve this will be greatly appreciated.

Upvotes: 1

Views: 201

Answers (1)

dipali
dipali

Reputation: 11188

viewPager.setOnTouchListener(new OnSwipeTouchListener() {
public void onSwipeRight() {
  if(your conditionIsMet){
// move your pager view to the right
     }
   }

});

I hope this is useful to you.

Upvotes: 1

Related Questions