Sliding menu gesture overwrites the scrollable gesture of a graph gesture-android

若如初见. 提交于 2019-12-22 10:27:49

问题


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



来源:https://stackoverflow.com/questions/18026373/sliding-menu-gesture-overwrites-the-scrollable-gesture-of-a-graph-gesture-androi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!