Pinch Zoom in Android

2019-04-02 05:10发布

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.

2条回答
The star\"
2楼-- · 2019-04-02 05:39

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.

查看更多
劳资没心,怎么记你
3楼-- · 2019-04-02 06:00

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

查看更多
登录 后发表回答