From 7be7fe06b299f804da6eb6ce2c7dbe039ca9265a Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 13 Jun 2016 17:47:16 +0200 Subject: [PATCH] remove the viewpagers DepthPageTransformer --- .../gallery/activities/ViewPagerActivity.java | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/app/src/main/java/com/simplemobiletools/gallery/activities/ViewPagerActivity.java b/app/src/main/java/com/simplemobiletools/gallery/activities/ViewPagerActivity.java index b7bae3a5f..fe37f80d8 100644 --- a/app/src/main/java/com/simplemobiletools/gallery/activities/ViewPagerActivity.java +++ b/app/src/main/java/com/simplemobiletools/gallery/activities/ViewPagerActivity.java @@ -82,7 +82,6 @@ public class ViewPagerActivity extends AppCompatActivity pager.setCurrentItem(pos); pager.addOnPageChangeListener(this); pager.setOnTouchListener(this); - //pager.setPageTransformer(true, new DepthPageTransformer()); getWindow().getDecorView().setOnSystemUiVisibilityChangeListener(this); updateActionbarTitle(); @@ -413,29 +412,4 @@ public class ViewPagerActivity extends AppCompatActivity super.onPause(); deleteFile(); } - - public class DepthPageTransformer implements ViewPager.PageTransformer { - private static final float MIN_SCALE = 0.75f; - - public void transformPage(View view, float position) { - int pageWidth = view.getWidth(); - - if (position < -1) { - view.setAlpha(0); - } else if (position <= 0) { - view.setAlpha(1); - view.setTranslationX(0); - view.setScaleX(1); - view.setScaleY(1); - } else if (position <= 1) { - view.setAlpha(1 - position); - view.setTranslationX(pageWidth * -position); - float scaleFactor = MIN_SCALE + (1 - MIN_SCALE) * (1 - Math.abs(position)); - view.setScaleX(scaleFactor); - view.setScaleY(scaleFactor); - } else { - view.setAlpha(0); - } - } - } }