Devlight / NavigationTabStrip

Navigation tab strip with smooth interaction.
Apache License 2.0
2.24k stars 313 forks source link

Problem with the point animation #24

Open androidAhmedMourad opened 7 years ago

androidAhmedMourad commented 7 years ago

the point kinda shakes while moving between the tabs as this gif shows:

ezgif-3144172844

willu2 commented 7 years ago

Maybe you will show your adapter?

merhong2012 commented 6 years ago
public void setViewPager(final ViewPager viewPager) {
        // Detect whether ViewPager mode
        if (viewPager == null) {
            mIsViewPagerMode = false;
            return;
        }

        if (viewPager.equals(mViewPager)) return;
        if (mViewPager != null) //noinspection deprecation
            mViewPager.setOnPageChangeListener(null);
        if (viewPager.getAdapter() == null)
            throw new IllegalStateException("ViewPager does not provide adapter instance.");

        mIsViewPagerMode = true;
        mViewPager = viewPager;
        mViewPager.addOnPageChangeListener(this);

     //   resetScroller();
        postInvalidate();
    }

Delete this coderesetScroller();