JazzyViewPager Documentation

repository·master·Indexed 25 days ago

https://github.com/jfeinstein10/jazzyviewpager

An Android library providing custom swiping animations for the standard ViewPager component. It serves as a drop-in replacement for ViewPager, allowing animation selection via the TransitionEffect enum and requiring specific PagerAdapter configuration for more than 3 views using setObjectForPosition.

Tokens
398
Snippets
2
Records
4
Agent score
33%

What's inside JazzyViewPager

  1. Configure PagerAdapter for more than 3 Views

    master

    To ensure animations work correctly when your ViewPager contains more than 3 views, you must register each object with the JazzyViewPager inside your PagerAdapter.instantiateItem method using setObjectForPosition(obj, position).

    private JazzyViewPager mJazzy;
    /* ... */
    @Override
    public Object instantiateItem(ViewGroup container, final int position) {
        Object obj = super.instantiateItem(container, position);
        mJazzy.setObjectForPosition(obj, position);
        return obj;
    }