private void onChanged(int newPageIndex) {
		if (newPageIndex == Constants.TOP_PAGE_INDEX) {
			mAbsoluteIndex--;
			// remove bottom view
			if (getChildAt(Constants.BOTTOM_PAGE_INDEX) != null) {
				removeViewAt(Constants.BOTTOM_PAGE_INDEX);
			}
			// add top view
			View newTopView = getViewAt(mAbsoluteIndex - 1);
			addView(newTopView, Constants.TOP_PAGE_INDEX);
			// make this view central
			snapPageWhenLayoutIsReady(Constants.CENTRAL_PAGE_INDEX);
		} else if (newPageIndex == Constants.BOTTOM_PAGE_INDEX) {
			mAbsoluteIndex++;
			// remove top view
			removeViewAt(Constants.TOP_PAGE_INDEX);
			// add bottom view
			View newBottomView = getViewAt(mAbsoluteIndex + 1);
			addView(newBottomView, Constants.BOTTOM_PAGE_INDEX);
			// make this view central
			snapPageWhenLayoutIsReady(Constants.CENTRAL_PAGE_INDEX);
		}
	}
Adding functionality of program page spapping and infinite paging. Call
{@link instaniate()} to initialize.

@author A.Zaitsev
app/src/main/java/pro/alexzaitsev/freepager/library/view/infinite/AbstractInfiniteVerticalPager.java