SimonVT / android-menudrawer

*DEPRECATED* A slide-out menu implementation, which allows users to navigate between views in your app.
http://simonvt.github.com/android-menudrawer/
Apache License 2.0
2.59k stars 1.11k forks source link

MenuDrawer Slider closing problem #212

Closed Prem-Tomar closed 10 years ago

Prem-Tomar commented 10 years ago

Here is my code

    mDrawer = (MenuDrawer) rootView.findViewById(R.id.drawer);
    mDrawer.setTouchMode(MenuDrawer.TOUCH_MODE_BEZEL);

  settingsButton.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(final View v) {
            // TODO Auto-generated method stub
            ((Swipe) getActivity()).showMenuDrawer(mDrawer);

        }
    });
    contactsButton.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(final View v) {
            // TODO Auto-generated method stub
            ((Swipe) getActivity())
                    .changeMenuDrawer(mDrawer);

        }
    });

   public void showMenuDrawer(MenuDrawer mDrawer) {
   // mDrawer.setMenuSize(800);
    mDrawer.setMenuView(R.layout.setting_menu_drawer);
    mDrawer.toggleMenu();

   }

    public void changeMenuDrawer(MenuDrawer mDrawer) {
    // mDrawer.setMenuSize(800);
    mDrawer.setMenuView(R.layout.contacts_menu_drawer);

mDrawer.toggleMenu();
 }
SimonVT commented 10 years ago

Please modify one of the samples so it displays this behavior.

Prem-Tomar commented 10 years ago

open closed

https://drive.google.com/file/d/0B-cDWQ14KK-_ZzExcTZ3TTlYdFU/edit?usp=sharing

Here is the project folder you can see that happening.

SimonVT commented 10 years ago

The content needs a background as it overlays the menu when sliding. Since you set it to transparent, the menu can be seen behind the content.

Prem-Tomar commented 10 years ago

I have to use transparent background otherwise all will be worthless for me. Please provide me any solution without removing transparent background.

Thanks

Prem-Tomar commented 10 years ago

Needs your help to resolve this issue. It will great for me if you will help me on this issue.

SimonVT commented 10 years ago

The content overlays the menu when dragging. If you don't want the menu to be visible behind the content, don't use a transparent background. It's as simple as that.

Prem-Tomar commented 10 years ago

I Understand that. but can you please tell me that where i can handle the animation duration so that i can close that menu quickly so it will be close with the drawer. Because i have limitations that i can not remove transparent background... If you don't mind

Thanks