如何像官方 Facebook 应用程序一样获得手势视图
我想在官方 Facebook 应用程序中实现通知视图的相同行为。 “通知”选项卡位于底部,可以通过手指拖/放至全屏。
我怎样才能做到这一点?
我已经通过 ViewFlipper 和 Animation 尝试过......但没有成功。
有谁知道我们该怎么做?
应用程序“Zedge”在“搜索”功能中具有相同的功能。 通过拖放,您可以打开“搜索”视图。
I want to implement the same behaviour of the notification view in the official Facebook app.
The "notifications" tab are at the bottom and can drag/drop via fingers to full screen.
How can i do that?
I've tried it via ViewFlipper and Animation.... But no success.
Does anyone know how we can do this?
The app "Zedge" has the same in the "search" function.
Via drag/drop you can open the "search" view.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这些应用程序使用 SlidingDrawer。 SlidingDrawer 将完成所有打开和关闭操作,您只需定义内容视图和句柄视图。
该视图也用作主屏幕上的应用程序抽屉。
Those Apps are using a SlidingDrawer. The SlidingDrawer will do all the opening and closing for you only have to define the content view and the view for the handle.
It is the same view that is also used as the application drawer on the home screen.
此外,这里有一个如何使用 SlideingDrawer 的小演示:
/src - SliderActivity.java:
/res/layout - main.xml
另外,您需要 / 中的图像res/drawable 文件夹 - 在这种情况下就像
arrowup.png
和arrowdown.png
如果你把它们放在一起,结果看起来像这样:
Additionally, here is a litte demo how the SlideingDrawer is used:
/src - SliderActivity.java:
/res/layout - main.xml
Additionally you need to images in your /res/drawable folder - in this case like
arrowup.png
andarrowdown.png
If you put that all together it turns out to look like that: