code: private static void attachToDecor(Activity activity, MenuDrawer menuDrawer) {
          ViewGroup decorView = (ViewGroup) activity.getWindow().getDecorView();
          ViewGroup decorChild = (ViewGroup) decorView.getChildAt(0);
  
          decorView.removeAllViews();
          decorView.addView(menuDrawer, LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
  
          menuDrawer.mContentContainer.addView(decorChild, decorChild.getLayoutParams());
      }
docs: Attaches the menu drawer to the window.