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

MENU_DRAG_CONTENT doesn't work with Google Support v7 (v21) #251

Closed klaw23 closed 10 years ago

klaw23 commented 10 years ago

The following code worked with Google Support v4. After upgrading to Google Support v7, setContentView(...) doesn't seem to work and drawerLayout is null. Passing MenuDrawer.MENU_DRAG_WINDOW to attach(...) works fine.

// In onCreate
mDrawer = MenuDrawer.attach(this, Position.RIGHT);
mDrawer.setContentView(R.layout.activity_main);
mDrawer.setMenuView(R.layout.online_tutors_container);
mDrawer.setTouchMode(MenuDrawer.TOUCH_MODE_FULLSCREEN);
DrawerLayout drawerLayout = findViewById(R.id.drawer_layout);
klaw23 commented 10 years ago

Nevermind. Somehow in adding Google Support v7 we stopped calling findViewById(...) on mDrawer.