code: 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);
      }
docs: bind indicator with viewpagerEx.
  @param pager