Doesn't work when multiple pages are visible.
osrl opened this issue · comments
Osman Saral commented
I override PagerAdapter.getPageWidth
:
@Override
public float getPageWidth(int position) {
return 0.5f;
}
Ian Thomas commented
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.
Osman Saral commented
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.