简体   繁体   English

Android:SlidingDrawer就像Android主窗口中的那个一样

[英]Android: SlidingDrawer like the one in the Android main window

I implemented a SlidingDrawer in my app and everything works fine so far. 我在应用程序中实现了SlidingDrawer,到目前为止一切正常。

Then I made an invisible handle, just like the one in the Android main window. 然后,我做了一个看不见的手柄,就像Android主窗口中的那个一样。

Now I want, that it is possible to grab the handle (and make it visible) just by moving the finger over the handle. 现在我想要的是,仅通过将手指移到手柄上就可以抓住手柄(并使它可见)。 I mean the same behaviour like the one in the Android main window. 我的意思是与Android主窗口中的行为相同。

But i don´t know how to mange that. 但是我不知道该如何处理。 (At the moment it only works when you tap at the handle, and not if you tap somewhere else and move the finger above the handle) (目前,仅当您点击手柄时它才起作用,而当您点击其他位置并将手指移到手柄上方时则无效)

Sounds like a bad idea. 听起来是个坏主意。 There will be no way to distinquish between the system's drawer and your app's drawer. 无法区分系统的抽屉和应用程序的抽屉。

You want to detect a swipe motion that starts on the top bezel. 您要检测从顶部边框开始的滑动动作

You want to use MotionEvent's getEdgeFlags() to detect whether a swipe gesture starts on the bezel. 您想使用MotionEventgetEdgeFlags()来检测边框上是否开始滑动手势。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM