The sliding menu (library) is always in full screen mode

I am trying to implement a sliding menu library in my application. My problem is that I seem to be unable to control the width of the menu. This is always full screen mode.

Can someone tell me how to solve this?

Here is the code I played with.

SlidingMenu menu = new SlidingMenu(this); menu.setMode(SlidingMenu.LEFT); menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_MARGIN); menu.setBehindWidth(10); menu.attachToActivity(this, SlidingMenu.SLIDING_WINDOW); 
+7
source share
2 answers

For those who accidentally stumbled upon this question, in search of how to solve it, I was able to solve my problem using the following code in my onCreate method.

 SlidingMenu sm = getSlidingMenu(); sm.setShadowWidthRes(R.dimen.slidingmenuWidth); sm.setBehindOffsetRes(R.dimen.slidingmenuOffset); sm.setFadeDegree(0.35f); sm.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN); <dimen name="slidingmenuWidth">15dp</dimen> <dimen name="slidingmenuOffset">60dp</dimen> 
+18
source

In one commit log, read Only behind width not working now [jfeinstein10] . It is probably broken.

What you can do is go to the largest component containing everything and install android:minWidth on it. After a quick glance, it seems like it could be menu_frame.xml . But you can check out a few things.

0
source

All Articles