问题
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