title: ViewPagerIndicator and setOnPageChangeListener
body: <p>I'd like to change the background color as the user changes pages, for that I need to use ViewPager's <code>setOnPageChangeListener</code>. But it seems that this brakes ViewPagerIndicator, as the indicator is stuck in the first page. Here's the code  </p>
  
  <pre><code>viewPager.setOnPageChangeListener(new OnPageChangeListener() {
      @Override
      public void onPageSelected(int position) {
          ColorDrawable[] colors = {new ColorDrawable(backgroundColors[previousPosition]), new ColorDrawable(backgroundColors[position])};
          TransitionDrawable trans = new TransitionDrawable(colors);
          viewPager.setBackgroundDrawable(trans);
          trans.startTransition(200);
          previousPosition = position;
      }
  
      @Override
      public void onPageScrolled(int arg0, float arg1, int arg2) {}
  
      @Override
      public void onPageScrollStateChanged(int arg0) {}
  });
  </code></pre>