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.04k forks source link

BUG in android 4.3 #497

Open mypplication opened 11 years ago

mypplication commented 11 years ago

There is a big bug if you use this.mSlidingMenu.attachToActivity(this, SlidingMenu.SLIDING_CONTENT); on Android 4.3. All the fragments added in the window will not be visible.

nadavfima commented 11 years ago

I'm having the same problem while extending SlidingFragmentActivity (which calls attachToActivity via the helper). Any ideas on how to fix this?

arriolac commented 11 years ago

Same here, seeing this issue. Were you guys able to resolve this? SlidingMenu.SLIDING_WINDOW works for me on 4.3 but not SlidingMenu.SLIDING_CONTENT

chemerys commented 11 years ago

Same issue here. Works for me on 4.3 (Nexus 7) SlidingMenu.SLIDING_WINDOW but doesnt work SlidingMenu.SLIDING_CONTENT

Any ideas how to fix it?

GuilhE commented 10 years ago

I've the same issue but I'm creating the sliding menu as follow:

int widthMeasureSpec = MeasureSpec.makeMeasureSpec(ViewGroup.LayoutParams.WRAP_CONTENT, MeasureSpec.EXACTLY); int heightMeasureSpec = MeasureSpec.makeMeasureSpec(ViewGroup.LayoutParams.MATCH_PARENT, MeasureSpec.EXACTLY);

menu = getSlidingMenu(); menu.setMode(SlidingMenu.LEFT); menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN); menu.setShadowDrawable(R.drawable.shadow_menu); menu.setShadowWidthRes(R.dimen.bg_shadow_width);

menu.setBehindScrollScale(0.0f); menu.setFadeDegree(0.35f);

menuHolderRelativeLayout = (RelativeLayout) findViewById(R.id.menu_RelativeLayout); menuHolderRelativeLayout.measure(widthMeasureSpec, heightMeasureSpec); menu.setBehindWidth(menuHolderRelativeLayout.getMeasuredWidth());

this is initiated in a FragmentActivity that extends (SlidingFragmentActivity extends SherlockFragmentActivity implements SlidingActivityBase) and also in a Activity that extends (SlidingActivity extends SherlockActivity implements SlidingActivityBase)

http://stackoverflow.com/questions/20121696/slidingmenu-bug-in-android-4-3

GuilhE commented 10 years ago

I've found my problem. In Android Build.VERSION_CODES.JELLY_BEAN_MR2 there's a problem with "MeasureSpec.EXACTLY", it must be "AT_MOST" instead.