Skip to content

How to remove MenuDrawer from my rootView #271

@AskMeCode

Description

@AskMeCode

Hello all,

How i can remove the MenuDrawer From my rootView ?? i use like this.

ViewGroup rootView = (ViewGroup) ((ViewGroup) this.activity.findViewById(android.R.id.content)).getChildAt(0);

menuDraw.setContentView(rootView);

  • how i can remove it from my rootView i nned to romove it don't need use "TOUCH_MODE_NONE" because i need to twitch between MENU_DRAG_CONTENT & MENU_DRAG_WINDOW

  • my problem when i attach to window : " attachToDecor " the old menu still in the decor how i can remove it ?

????? Why this method not clear the previous menu: ????

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());
}

best regard

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions