fragment/src/main/java/androidx/fragment/app/OneShotPreDrawListener.java
public void removeListener() {
        if (mViewTreeObserver.isAlive()) {
            mViewTreeObserver.removeOnPreDrawListener(this);
        } else {
            mView.getViewTreeObserver().removeOnPreDrawListener(this);
        }
        mView.removeOnAttachStateChangeListener(this);
    }
/**
     * Removes the listener from the ViewTreeObserver. This is useful to call if the
     * callback should be removed prior to {@link #onPreDraw()}.
     */
Removes the listener from the ViewTreeObserver. This is useful to call if the
callback should be removed prior to  #onPreDraw().
Removes the listener from the ViewTreeObserver . This is useful to call if the callback should be removed prior to #onPreDraw () .
public void removeListener() {
        if (mViewTreeObserver.isAlive()) {
            mViewTreeObserver.removeOnPreDrawListener(this);
        } else {
            mView.getViewTreeObserver().removeOnPreDrawListener(this);
        }
        mView.removeOnAttachStateChangeListener(this);
    }
public void removeListener ( ) { if ( mViewTreeObserver . isAlive ( ) ) { mViewTreeObserver . removeOnPreDrawListener ( this ) ; } else { mView . getViewTreeObserver ( ) . removeOnPreDrawListener ( this ) ; } mView . removeOnAttachStateChangeListener ( this ) ; }
Removes the listener from the ViewTreeObserver.
Removes the listener from the ViewTreeObserver .