@Override
    protected void onAttachedToWindow() {
        super.onAttachedToWindow();
        mFirstLayout = true;
    }
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.
library/src/main/java/com/daimajia/slider/library/Tricks/ViewPagerEx.java