Pinch Zoom in Android

风格不统一 提交于 2019-12-21 06:01:55

问题


I have a layout, which include some TextViews and ImageViews. Haven't they created an easy way to include pinch zoom on an simple ScrollView/LinearLayout? I have watched some codes, but they work only on ImageViews.

Recently I found setDisplayZoomControls(boolean).

Is it possible to make this work on a layout with TextViews? If no, maybe somebody provides a code, which will zoom in/out my layout with pinch zoom.

Thanks.


回答1:


Try using android-pinch, it is supposed to work on web-views as well http://code.google.com/p/android-pinch/




回答2:


Also,

Take a look at this: http://code.google.com/p/android-multitouch-controller/

It will enable you to add multi touch handlers to almost any widget.

Note that due to some hardware problems on older devices, you might not always get the right result.



来源:https://stackoverflow.com/questions/9519526/pinch-zoom-in-android

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