Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setOnPageChangeListener doesn't work #6

Closed
cesards opened this issue May 4, 2014 · 4 comments
Closed

setOnPageChangeListener doesn't work #6

cesards opened this issue May 4, 2014 · 4 comments

Comments

@cesards
Copy link

cesards commented May 4, 2014

I've been trying to figure out why setOnPageChangeListener doesn't work with the VerticalViewPager. I do the next:

pagerView.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
      @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
       ...
      }

      @Override public void onPageSelected(int position) {
       ...
      }

      @Override public void onPageScrollStateChanged(int state) {
        i...
      }
    });

Methods are never called.

@castorflex
Copy link
Owner

Weird, it works great here :s
Can you share more code?

@cesards
Copy link
Author

cesards commented May 4, 2014

I just solved the problem.

I'm using your library with ViewPagerIndicator. As VerticalViewPager is not extending support ViewPager, I had to hack a little bit VPI to make it work. It was not your library problem, so it's fixed.

I think the library would become more usable if it would extend ViewPager, because it has to be adjusted for every "ViewPager" need... I could try to have a look and study what we can do with it.

Do you think it's worth?

Regards!

@cesards cesards closed this as completed May 4, 2014
@MeetM
Copy link

MeetM commented May 26, 2014

Hey Cesards, can you share what changes you did in the VPI to get it working with Vertical VP? Thanks

@raychenon
Copy link

The VerticalViewPager's OnPageChangeListener is set to null when ViewPagerIndicator is used.
Please re open this ticket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants