SlidingMenu Width Not Correct

android, java, slidingmenu

Solution

I have a menu sliding from the right and simply call:

getSlidingMenu().setMode(SlidingMenu.RIGHT);
getSlidingMenu().setBehindOffset(100);

Hope that helps

Problem

I'm using jfeinstein1's slidingmenu library in my project. I would like to have the sliding menu slide out to about 3/4 of the width of the screen. According to the docs, this should be able to be accomplished using ``` setBehindWidth() setBehindOffset() ``` But at the moment, the menu slides all the way to the right and covers the entire screen. Below is my code: ``` public void setupMenu() { setContentView(R.layout.activity_base); menu = new SlidingMenu(this); menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN); menu.setBehindWidth(100); menu.setBehindOffset(100); menu.attachToActivity(this, SlidingMenu.SLIDING_CONTENT); menu.setMenu(R.layout.sliding_menu); } ``` Thanks in advance

Original source