Sliding menu gesture overwrites the scrollable ges

2019-05-11 09:05发布

问题:

I am using a sliding menu from here in my application. My app also has a GraphView in which I set some data in real time. The graph is a linear graph which is scrollable, to the left and to the right. But, having the sliding menu by a left to right gesture, the user cannot scroll in the graph because the menu keeps popping out.

Is there any way I can overwrite the menu functionality when a certain item is pressed? The graph item is just a LinearLayout.

I am also using fragments, so each menu item is a fragment.

回答1:

Make sure you call

setTouchModeAbove(SlidingMenu.TOUCHMODE_MARGIN);

and not

setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);

On your SlidingMenu object/fragment/activity so that the menu shows only when you drag it from the edge/bezel of your screen