From 20d681b0db9ee860c7d024823291ca9f094cc981 Mon Sep 17 00:00:00 2001 From: sunyichao Date: Tue, 17 Oct 2017 09:35:29 +0800 Subject: [PATCH] =?UTF-8?q?[FIX]=20=E5=8F=AF=E4=BB=A5=E5=9C=A8=E5=A4=96?= =?UTF-8?q?=E9=83=A8=E8=AE=BE=E7=BD=AE=E6=98=BE=E7=A4=BA=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- imageviewer/src/main/java/cn/imageviewer/view/ImageViewer.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/imageviewer/src/main/java/cn/imageviewer/view/ImageViewer.java b/imageviewer/src/main/java/cn/imageviewer/view/ImageViewer.java index 3474050..3b304f4 100644 --- a/imageviewer/src/main/java/cn/imageviewer/view/ImageViewer.java +++ b/imageviewer/src/main/java/cn/imageviewer/view/ImageViewer.java @@ -144,6 +144,7 @@ public void onPageSelected(int position) { public void setCurrentPage(int page) { index = page; + viewpager.setCurrentItem(index); } @Override @@ -161,6 +162,7 @@ private void setupViewPager(ViewPager viewPager) { viewPager.setPageMargin(getResources().getDimensionPixelSize(R.dimen.imgeviewer_margin)); viewPager.setOffscreenPageLimit(1); viewPager.setAdapter(adapter); + switch (transformerType) { case TYPE_CUBEOUT_TRANSFORMER: viewPager.setPageTransformer(true, new CubeOutTransformer());