title: CirclePageIndicator in Activity not animating according to ViewPager in fragment
body: <p><strong>What I have</strong></p>
  
  <p>I have an <code>HomeActivity</code> which has <code>Custom Toolbar</code> that contains <code>Buttons</code> &amp; <strong>CirclePageIndicator</strong></p>
  
  <p>I have a <code>HomeFragment</code> that has <strong>ViewPager</strong> , that shows 3 different <code>Fragments</code></p>
  
  <p><strong>What I want</strong></p>
  
  <p>I wanted the <code>CirclePageIndicator</code>in <code>Activity</code> to do transition animation (changing the dotts) according to the <code>ViewPager</code> in <code>fragment</code></p>
  
  <p><strong>My problem</strong></p>
  
  <p>The <code>CirclePageIndicator</code> in <code>Activity</code> not animating according to <code>ViewPager</code> in fragment</p>
  
  <p><code>CirclePageIndicator</code> indicated the <code>first dot only</code> , not changes to <code>second dot</code> when I scroll the <code>ViewPager</code> </p>
  
  <p><strong>My code</strong></p>
  
  <p>activity_home.xml</p>
  
  <pre><code>&lt;com.viewpagerindicator.CirclePageIndicator
                      android:id="@+id/circle_indicator"
                      android:layout_width="100dp"
                      android:layout_height="wrap_content"
                      android:layout_below="@+id/tv_header_tittle"
                      android:layout_centerHorizontal="true"
                      android:layout_gravity="center"
                      android:layout_marginTop="2dp"
                      android:layout_marginBottom="2dp"
                      android:visibility="visible"
                      app:fillColor="@color/white"
                      app:pageColor="@color/cyan_dark"
                      app:strokeColor="@color/white" /&gt;
  </code></pre>
  
  <p>fragment_home.xml</p>
  
  <pre><code>&lt;android.support.v4.view.ViewPager
          android:id="@+id/viewpager"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:background="@color/cyan"
          app:layout_behavior="@string/appbar_scrolling_view_behavior"&gt;&lt;/android.support.v4.view.ViewPager&gt;
  </code></pre>
  
  <p>HomeFragment.java</p>
  
  <pre><code>viewPager = (ViewPager) rootView.findViewById(R.id.viewpager);
  circlePageIndicator = (CirclePageIndicator) getActivity().findViewById(R.id.circle_indicator);
  profilePagerAdapter = new ProfilePagerAdapter(getChildFragmentManager());
  viewPager.setAdapter(profilePagerAdapter);
  circlePageIndicator.setViewPager(viewPager);
  </code></pre>
  
  <p>ProfilePageAdapter.java</p>
  
  <pre><code>public class ProfilePagerAdapter extends FragmentPagerAdapter {
      // Tabs number
      private int numberOfTabs;
  
      public ProfilePagerAdapter(FragmentManager fm) {
          super(fm);
      }
  
      @Override
      public Fragment getItem(int position) {
  
          switch (position) {
              case 0:
                  ProfilePhotosFragment profilePhotosFragment = new ProfilePhotosFragment();
                  return profilePhotosFragment;
              case 1:
                  ProfileAlbumFragment profileAlbumFragment = new ProfileAlbumFragment();
                  return profileAlbumFragment;
              case 2:
                  ProfileLocationFragment profileLocationFragment = new ProfileLocationFragment();
                  return profileLocationFragment;
              default:
                  return null;
          }
  
      }
  
      @Override
      public int getCount() {
          return 3;
      }
  }
  </code></pre>