@Override
    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
        super.onSizeChanged(w, h, oldw, oldh);

        // Make sure scroll position is set correctly.
        if (h != oldh) {
            recomputeScrollPosition(h, oldh, mPageMargin, mPageMargin);
        }
    }
This is the persistent state that is saved by ViewPager.  Only needed
if you are creating a sublass of ViewPager that must save its own
state, in which case it should implement a subclass of this which
contains that state.
dkplayer-sample/src/main/java/xyz/doikki/dkplayer/widget/VerticalViewPager.java