public void setViewPager(ViewPagerEx pager){
        if(pager.getAdapter() == null){
            throw new IllegalStateException("Viewpager does not have adapter instance");
        }
        mPager = pager;
        mPager.addOnPageChangeListener(this);
        ((InfinitePagerAdapter)mPager.getAdapter()).getRealAdapter().registerDataSetObserver(dataChangeObserver);
    }
bind indicator with viewpagerEx.
@param pager
library/src/main/java/com/daimajia/slider/library/Indicators/PagerIndicator.java