title: Android : How to put right to left animation for viewpager
body: <p>Please have look at below code,</p>
  
  <pre><code>viewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
              @Override
              public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
  
              }
  
              @Override
              public void onPageSelected(int position) {
  
                  if(viewPager.getCurrentItem()==1){
  
                      Log.d("MAIN_ACTIVITY", "POSITION " + position);
  
                      viewPager.setPageTransformer(true, new ViewPager.PageTransformer() {
                          @Override
                          public void transformPage(View page, float position) {
  
                              Animation logoMoveAnimation = AnimationUtils.loadAnimation(context,R.anim.logoanimation);
                              page.startAnimation(logoMoveAnimation);
  
                          }
                      });
                  }else{
                      viewPager.setPageTransformer(true, null);
                  }
  
              }
  
              @Override
              public void onPageScrollStateChanged(int state) {
  
              }
  });
  </code></pre>
  
  <p><strong>logoanimation.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;set xmlns:android="schemas.android.com/apk/res/android"
      android:interpolator="@android:anim/linear_interpolator"&gt;
      &lt;scale android:fromXScale="0.0" android:fromYScale="0.0"
          android:toXScale="1.0" android:toYScale="1.0"
          android:duration="700" android:fillBefore="false" /&gt;
      &lt;translate android:fromXDelta="-200" android:fromYDelta="-200"
          android:duration="700" /&gt;
  &lt;/set&gt;
  </code></pre>
  
  <p>Current animation is fade in fade out . But I want to put right to left animation whether elements of the viewpager move forward or backward .</p>
  
  <p>Have any ideas ?</p>
  
  <p>Thank you.</p>