触摸任何地方,滑动打开菜单导航抽屉 [英] Touch anywhere to slide open menu for navigation drawer

查看:286
本文介绍了触摸任何地方,滑动打开菜单导航抽屉的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关的滑动由jfeinstein10( https://github.com/jfeinstein10/SlidingMenu )菜单,我可以在任何地方,在滑动应用滑动打开菜单。

有关谷歌新推出的抽屉式导航<一href="http://developer.android.com/design/patterns/navigation-drawer.html#side-nav">http://developer.android.com/design/patterns/navigation-drawer.html#side-nav,有什么办法,我可以有类似的行为?

到目前为止,从文档,我看到了它只能限制从边缘或触摸应用程序图标滑动。

  

用户可以通过刷卡带来导航抽屉到屏幕上   从屏幕的左边缘或通过触摸应用程序图标   操作栏上的。

解决方案

我已经找到了解决办法。您可以配置触摸的保证金,并使其尽可能广泛你的观点。这里是链接

<一个href="http://stackoverflow.com/questions/16988597/set-drag-margin-for-android-navigation-drawer/17802569#17802569">Set拖累利润率为Android导航抽屉

For Sliding menu by jfeinstein10 (https://github.com/jfeinstein10/SlidingMenu), I can slide anywhere in the app to slide open the menu.

For Google newly introduced navigation drawer http://developer.android.com/design/patterns/navigation-drawer.html#side-nav, is there any way I can have similar behaviour?

So far, from documentation, I saw it only limit to slide from edge or touching the app icon.

The user can bring the navigation drawer onto the screen by swiping from the left edge of the screen or by touching the application icon on the action bar.

解决方案

I have found a solution. You can configure margin of touch and make it as wide as your view is. Here is the link

Set drag margin for Android Navigation Drawer

这篇关于触摸任何地方,滑动打开菜单导航抽屉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆