如何在应用程序的 UI 上启用捏合和拉伸功能
我有一个带有文本视图的表格布局。由于每行中的文本都足够小以适合屏幕,我希望我的用户能够捏合和拉伸屏幕,以便他们可以放大。但是,目前该功能默认情况下不起作用。那么我怎样才能启用捏合和拉伸屏幕呢?
谢谢
I've a table layout with a textview in it. As the texts within every row are small enough to fit into the screen, I want my users to be able to pinch and stretch the screen so that they can zoom in. But, currently that feature is not working by default. How can i enable pinching and stretching the screen, then?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以自己实施。首先阅读这个多部分教程: http://www.zdnet.com/blog/burnette/how-to-use-multi-touch-in-android-2/1747(第 6 部分专门介绍捏合和缩放)以及其他帖子开发者博客:http://android-developers.blogspot .com/2010/06/making-sense-of-multitouch.html
还有一个看起来很有前途的库(尽管我没有尝试过):http://code.google.com/p/android-pinch/
You can implement it yourself. Start by reading this multipart tutorial: http://www.zdnet.com/blog/burnette/how-to-use-multi-touch-in-android-2/1747 (part 6 is devoted to pinch and zoom) and this other post in the devs blog: http://android-developers.blogspot.com/2010/06/making-sense-of-multitouch.html
There's also a library that looks promising (although I did not try it): http://code.google.com/p/android-pinch/