title: Issue using ViewPager and PageTransformer with Android API <11
body: <p>I need to write a custom transition for a ViewPager on an app with <code>android:minSdkVersion="9"</code>.</p>
  
  <p>I'm trying to run the <code>ZoomOutPageTransformer</code> given <a href="http://developer.android.com/training/animation/screen-slide.html#zoom-out" rel="noreferrer">here</a>.    </p>
  
  <p>I get no compiling error, and on a Samsung Galaxy S running Android 2.3.3 (API 10), the line</p>
  
  <pre><code>pager.setPageTransformer(true, new ZoomOutPageTransformer());
  </code></pre>
  
  <p>does not give any error, but the code in ZoomOutPageTransformer's <code>transformPage</code> is never executed.</p>
  
  <p>The code works perfectly if I set <code>android:minSdkVersion="11"</code> and use my Nexus 4 (API 17).</p>
  
  <p>Can these PageTransformers be used with API 9 and 10? Otherwise, how can I create custom transitions for <code>ViewPager</code>?</p>
  
  <p><b>EDIT</b></p>
  
  <p>Here's the code I use:</p>
  
  <pre><code>public class HomeFragment extends Fragment{ 
  
      ViewPager mNewsTitlePager;
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
  
          return inflater.inflate(R.layout.home_content, container, false);
      }
  
      @Override
      public void onActivityCreated (Bundle savedInstanceState){
  
          super.onActivityCreated(savedInstanceState); 
  
          mNewsTitlePager = (ViewPager) getView().findViewById(R.id.news_title_pager);
          mNewsTitlePager.setPageTransformer(true, new ZoomOutPageTransformer());
  
          mNewsTitlePager.setAdapter(new NewsPagerAdapter(news_item_list));
  
  
      }
  
      private class NewsPagerAdapter extends PagerAdapter {
  
          private List&lt;News&gt; news_item_list;
          private LayoutInflater inflater;
  
          NewsPagerAdapter(List&lt;News&gt; news_item_list) {
              this.news_item_list = news_item_list;
              inflater = getActivity().getLayoutInflater();
          }
  
          @Override
          public void destroyItem(ViewGroup container, int position, Object object) {
              ((ViewPager) container).removeView((View) object);
          }
  
          @Override
          public void finishUpdate(View container) {
          }
  
          @Override
          public int getCount() {
              return this.news_item_list.size();
          }
  
          @Override
          public Object instantiateItem(ViewGroup view, int position) {
              TextView news_title = (TextView) inflater.inflate(R.layout.news_title_item, view, false);
  
              news_title.setText(news_item_list.get(position).title);
  
              ((ViewPager) view).addView(news_title, 0);
              return news_title;
          }
  
          @Override
          public boolean isViewFromObject(View view, Object object) {
              return view.equals(object);
          }
  
          @Override
          public void restoreState(Parcelable state, ClassLoader loader) {
          }
  
          @Override
          public Parcelable saveState() {
              return null;
          }
  
          @Override
          public void startUpdate(View container) {
          }
  
  
      }
  
      public class ZoomOutPageTransformer implements ViewPager.PageTransformer {
          private float MIN_SCALE = 0.85f;
          private float MIN_ALPHA = 0.5f;
  
          public void transformPage(View view, float position) {
              int pageWidth = view.getWidth();
              int pageHeight = view.getHeight();
  
              if (position &lt; -1) { // [-Infinity,-1)
                  // This page is way off-screen to the left.
                  view.setAlpha(0);
  
              } else if (position &lt;= 1) { // [-1,1]
                  // Modify the default slide transition to shrink the page as well
                  float scaleFactor = Math.max(MIN_SCALE, 1 - Math.abs(position));
                  float vertMargin = pageHeight * (1 - scaleFactor) / 2;
                  float horzMargin = pageWidth * (1 - scaleFactor) / 2;
                  if (position &lt; 0) {
                      view.setTranslationX(horzMargin - vertMargin / 2);
                  } else {
                      view.setTranslationX(-horzMargin + vertMargin / 2);
                  }
  
                  // Scale the page down (between MIN_SCALE and 1)
                  view.setScaleX(scaleFactor);
                  view.setScaleY(scaleFactor);
  
                  // Fade the page relative to its size.
                  view.setAlpha(MIN_ALPHA +
                          (scaleFactor - MIN_SCALE) /
                          (1 - MIN_SCALE) * (1 - MIN_ALPHA));
  
              } else { // (1,+Infinity]
                  // This page is way off-screen to the right.
                  view.setAlpha(0);
              }
          }
  
      }
  
  
  }
  </code></pre>