jfeinstein10 / SlidingMenu

An Android library that allows you to easily create applications with slide-in menus. You may use it in your Android apps provided that you cite this project and include the license in your app. Thanks!
Apache License 2.0
11.08k stars 5.05k forks source link

setMenu method can't work #708

Open LixamWei opened 9 years ago

LixamWei commented 9 years ago

The code as follow: // configure the SlidingMenu menu = new SlidingMenu(this); menu.setMode(SlidingMenu.LEFT); menu.setMenu(R.layout.menu_frame);
menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN); menu.setBehindOffset(100); menu.setFadeDegree(0.35f); menu.attachToActivity(this, SlidingMenu.SLIDING_WINDOW);

But the method setMenu did't work.The layout of menu is empty.why?

vitalikaz commented 9 years ago

Same here. Even if layout passed to setMenu has, say, black background with match_parent width and height, the menu view still has default color and inflated view is not displayed. But the strange thing is that you CAN access elements inflated to the menu view with

menu.getMenu().findViewById(R.id.some_object_from_menu_frame); // works well

, but these objects are not visible. Any ideas?