ViewPagerTransforms
ViewPagerTransforms copied to clipboard
Doesn't work when multiple pages are visible.
I override PagerAdapter.getPageWidth
:
@Override
public float getPageWidth(int position) {
return 0.5f;
}
Can you please be more descriptive. It is hard to help when the issue is vague. What output did you get and what output did you expect. Example projects are best for conveying problems.
I've added these to your demo app:
In your activity_main.xml
android:paddingLeft="160dp"
android:paddingRight="160dp"
android:clipToPadding="false"
In your pager adapter:
@Override
public float getPageWidth(int position) {
return 1.5f;
}
In your onCreate
:
mPager.setPageMargin(6);
mPager.setOffscreenPageLimit(9);
I choose ZoomOutSlideTransformer
from the spinner. Expected behaviour is; center page should be bigger, and should slide zoom out when scrolled.
I hope I was explanatory.