how to force the Sliding menu to cover the whole activity

474 Views Asked by At

I Use a Sliding menu of Jeremy Feinstein , https://github.com/jfeinstein10/SlidingMenu , and in my application when i open the side menu covers the half activity. I just need to covers the whole activity ( full width sidebar ).

Thanks

2

There are 2 best solutions below

2
On BEST ANSWER

I'm not sure if this'll help you but as i remember you can set it like: Create a dimen resources named "sliding_menu_offset" and set it to "0" Than in code set your resources to left menu' behind offset res

yourLeftMenu.setBehindOffsetRes(R.dimen.sliding_menu_offset);
0
On

As i saw in the link you posted, you can include your slidingMenu in your activity by using this view:

<com.jeremyfeinstein.slidingmenu.lib.SlidingMenu
xmlns:sliding="http://schemas.android.com/apk/res-auto"
android:id="@+id/slidingmenulayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
sliding:viewAbove="@layout/YOUR_ABOVE_VIEW"
sliding:viewBehind="@layout/YOUR_BEHIND_BEHIND"
sliding:touchModeAbove="margin|fullscreen"
sliding:behindOffset="@dimen/YOUR_OFFSET"
sliding:behindWidth="@dimen/YOUR_WIDTH"
sliding:behindScrollScale="@dimen/YOUR_SCALE"
sliding:shadowDrawable="@drawable/YOUR_SHADOW"
sliding:shadowWidth="@dimen/YOUR_SHADOW_WIDTH"
sliding:fadeEnabled="true|false"
sliding:fadeDegree="float"
sliding:selectorEnabled="true|false"
sliding:selectorDrawable="@drawable/YOUR_SELECTOR"/>

if so, so you can change the width of the view like this: android:layout_width="500dp" or as much as you want, and you can set it from code, by getting the width of the device and set it to the sliding menu