ViewPager overview

AmazingViewPager: switch to a page view controls, also known as page switcher.AmazingViewPager switch, support, horizontal/vertical support cycle.AmazingViewPager inherited from the AdapterView, directly support the use of the Android system of Adapter.


Open/close loop switch

You can according to the demand for open or closed loop switch:

Switch to true, open loop;Switch to false, the closed loop.The default value is true.

Set the switch direction

You can set in different application AmazingViewPager switch direction:

Parameter value scope: AmazingViewPager. HORIZONTAL transverse switching, AmazingViewPager. VERTICAL longitudinal switch.

Page switching listeners

You can use the listener to monitor page switch, switch to the page when dealing with your logic.

Page switching listeners

Listening to the page to switch

To monitor page switching, you need to OnPageChangedListener onPageChanged in the listener () method.When the page will switch control callback this method.

The following is a typical usage:

public class PagerActivity extends Activity implements OnPageChangedListener {
    private AmazingViewPager mPager;

    public void onCreate(Bundle savedInstanceState) {
        mPager = (AmazingViewPager) findViewById(;

    public void onPageChanged(AmazingViewPager pager, int currentPage, int oldPage) {
        //TODO:on pang changed