Next, you need to tune these properties of the pager in the containing fragment or activity:
ViewPager vpPager = (ViewPager) view.findViewById(R.id.vpPager); vpPager.setClipToPadding(false); vpPager.setPageMargin(12); // Now setup the adapter as normal Finally, adjust the width inside the adapter: class MyPageAdapter : FragmentStatePagerAdapter { @Override public float getPageWidth (int position) { return 0.93f; } // ... }
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Can you answer this question?
Write Answer1 Answers