I asked this question about programmatically opening the slidemenu from a library on github yesterday and it was answered. However I had more questions about the subject but the question got closed for a reason i disagree.
My followup question is that the toggle() method does show your menu but is different from setBehindContentView(). I successfully added a layout to my setBehindContentView with java class so i can manipulate the onlistclick event but cant for the setMenu() method.
So I got this code:
setBehindContentView(R.layout.menu_frame);
getSupportFragmentManager()
.beginTransaction()
.add(R.id.menu_frame, new MenuFragment())
.commit();
which works if I swipe the screen to the right and show the underlying view. But since my whole map is a Google MapView I wanted to programmatically show the menu with toggle(). I set the layout like this:
menu.setMenu(R.layout.menu);
but that only shows the layout but doesnt run the corresponding code which inflates this layout and creates listitems. Does anyone know how to programmatically show the behindcontentview OR get the setMenu() method working with a java class?
fixed:
if someone needs more code, feel free to contact me