ViewPagerTransforms icon indicating copy to clipboard operation
ViewPagerTransforms copied to clipboard

Doesn't work when multiple pages are visible.

Open osrl opened this issue 9 years ago • 2 comments

I override PagerAdapter.getPageWidth:

@Override
public float getPageWidth(int position) {
    return 0.5f;
}

osrl avatar May 05 '15 20:05 osrl

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.

ToxicBakery avatar May 05 '15 21:05 ToxicBakery

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.

osrl avatar May 06 '15 07:05 osrl