Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to remove MenuDrawer from my rootView #271

Open
AskMeCode opened this issue Jul 27, 2018 · 0 comments
Open

How to remove MenuDrawer from my rootView #271

AskMeCode opened this issue Jul 27, 2018 · 0 comments

Comments

@AskMeCode
Copy link

AskMeCode commented Jul 27, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant