@Override
    protected void onAttachedToWindow() {
        super.onAttachedToWindow();
        getViewTreeObserver().addOnScrollChangedListener(mScrollListener);
    }
Attaches the menu drawer to the window.
menudrawer/src/net/simonvt/menudrawer/MenuDrawer.java