Skip to content

Commit

Permalink
[FIX] 可以在外部设置显示页
Browse files Browse the repository at this point in the history
  • Loading branch information
sunyichao committed Oct 17, 2017
1 parent 8353854 commit 20d681b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ public void onPageSelected(int position) {

public void setCurrentPage(int page) {
index = page;
viewpager.setCurrentItem(index);
}

@Override
Expand All @@ -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());
Expand Down

0 comments on commit 20d681b

Please sign in to comment.