SlidingMenu Toggle() lag/blinking
See original GitHub issueHi all!
First, thank’s for the library @jfeinstein10 , its awesome!
Im making my app on ADT with our library from the master branch… I’ve made the menu slide implementation and have some trouble with toggle() function.
Menu still lag’s just on “open” event and don’t seem smoother slide animation…
I’ve try’d switch targetsdk from 19 to 14 and minsdk to 8 but problem still…
My MainActivity:
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main_layout);
menu = new SlidingMenu(this);
menu.setMode(SlidingMenu.LEFT);
menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_MARGIN);
menu.setShadowDrawable(R.drawable.shadow);
menu.setShadowWidthRes(R.dimen.shadow_width);
menu.setBehindOffsetRes(R.dimen.slidingmenu_offset);
menu.attachToActivity(this, SlidingMenu.SLIDING_WINDOW);
menu.setBehindScrollScale(0.25f);
menu.setFadeDegree(0.25f);
menu.setMenu(R.layout.sliding_menu);
});
sliding_menu.xml is one listview with one imageview (small icon) and one textview (description of menuitem), background color = #FFF
Any suggestions? Thanks!
EDIT: I’ve looked strange logs on logcat while i try to open, close and open again the menu, it seems one error on first “toggle()” event on my application, then runs normal on close toggle, and on second open event, it seems to pass 3 times on “open” event…
First Open
First Close
Second Open
Issue Analytics
- State:
- Created 9 years ago
- Comments:12
Top GitHub Comments
I have no idea what exactly I’m doing but I got a workaround/hack for this. In CustomViewBehind.java, around line 214, make this change
As said, I have no idea what I’m doing, just guessing by keeping the behind view visible all the time, we don’t need to re-build the cache or something along that line.
@torinnguyen Thanks for that fix!