private int getNewPositionOfCurrentPage() {
        // check if id is on same position, this is because it will
        // often be that and this way you do not need to iterate the whole
        // dataset. If it is the same position, you are done.
        if (mCurrentPageId == mAdapter.getItemId(mCurrentPageIndex)) {
            return mCurrentPageIndex;
        }

        // iterate the dataset and look for the correct id. If it
        // exists, set that position as the current position.
        for (int i = 0; i < mAdapter.getCount(); i++) {
            if (mCurrentPageId == mAdapter.getItemId(i)) {
                return i;
            }
        }
        // Id no longer is dataset, keep current page
        return mCurrentPageIndex;
    }
@author emilsjolander
        <p>
        Class to hold a view and its corresponding info
app/src/main/java/home/smart/fly/animations/customview/flipview/FlipView.java