@Override
    protected void onDetachedFromWindow() {
        super.onDetachedFromWindow();
        if (mScrollChecker != null) {
            mScrollChecker.destroy();
        }

        if (mPerformRefreshCompleteDelay != null) {
            removeCallbacks(mPerformRefreshCompleteDelay);
        }
    }
This layout view for "Pull to Refresh(Ptr)" support all of the view, you can contain everything you want.
support: pull to refresh / release to refresh / auto refresh / keep header view while refreshing / hide header view while refreshing
It defines {@link in.srain.cube.views.ptr.PtrUIHandler}, which allows you customize the UI easily.
ptr-lib/src/in/srain/cube/views/ptr/PtrFrameLayout.java