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

It not worded when I set a onPageChangeListener,and not work with viewpager. #48

Open
Aima09 opened this issue May 3, 2018 · 1 comment

Comments

@Aima09
Copy link

Aima09 commented May 3, 2018

what wrong with the problem?
`mSubaeraTablayout.setTitles(array);
// mSubaeraTablayout.setStripColor(Color.RED);
mSubaeraTablayout.setTabIndex(curZoneChannelPos, true);

    mSubaeraTablayout.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
        @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
         //not worked!
            ToastUtil.showShortToast("position"+position);

        }

        @Override public void onPageSelected(int position) {
            ToastUtil.showShortToast("position"+position);
        }

        @Override public void onPageScrollStateChanged(int state) {
            ToastUtil.showShortToast("position"+state);

        }
    });`
@segunmicheal27
Copy link

segunmicheal27 commented May 10, 2018

use this instead

 ```
     mSubaeraTablayout.setOnTabStripSelectedIndexListener(new 
                             mSubaeraTablayout.OnTabStripSelectedIndexListener() {
                            @Override
                         public void onStartTabSelected(String title, int index) {
          T               oastUtil.showShortToast("position"+index);

       }

     @Override
       public void onEndTabSelected(String title, int index) {
        
      }

   });

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

2 participants