How can i enable pinching and stretching on my app's UI

房东的猫 提交于 2019-12-25 06:55:28

问题


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


回答1:


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/



来源:https://stackoverflow.com/questions/6085420/how-can-i-enable-pinching-and-stretching-on-my-apps-ui

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