title: How to set the animation on imageview when swip the image right to left and vice versa
body: <p>I am using the following code that is swipe the left to right and setting the animation on image view.
  But when swipe the image left to right the the current image disappear and next image will come with animation swipe. But i want to swipe on current image it will go as swipe out animation.Please help me and appreciate you!</p>
  
  <p>My code is:</p>
  
  <pre><code>{
      Log.v(TAG + "onClick", "left to right swipe ");
  
      currentindex++;
      Log.v(TAG + "onClick", "you select image num : " +currentindex);
      //gallery.setSelection(currentindex, true);
      filename = it.get(currentindex);
      image = getBitmapFromAsset(filename);
      Drawable drawable = new BitmapDrawable(image);
      //imageView.setAnimation(slideLeftIn);
      TranslateAnimation anim = new TranslateAnimation(1000, 0, 0, 0);
      anim.setDuration(500);
      anim.setFillAfter(true);
      imageView.startAnimation(anim);
      imageView.setAdjustViewBounds(true);
      imageView.setScaleType(ScaleType.FIT_CENTER);
      //imageswitcher.setOutAnimation(slideRightOut);
      int padding = context.getResources().getDimensionPixelSize(R.dimen.padding_medium);
      imageView.setPadding(padding, padding, padding, padding);
      imageView.setImageDrawable(drawable);
  }
  </code></pre>