开发者

the best way to pinch to zoom an imageview

开发者 https://www.devze.com 2023-04-06 16:30 出处:网络
What is the best way to pinch-to-zoom an imageview in And开发者_JS百科roid, because i\'ve been searching this for a long long time. Is there some tutorial, or example ? I just want some tips to guide

What is the best way to pinch-to-zoom an imageview in And开发者_JS百科roid, because i've been searching this for a long long time. Is there some tutorial, or example ? I just want some tips to guide me in the right direction.


you can use scalegesturedetector see here http://android-developers.blogspot.com/2010/06/making-sense-of-multitouch.html


If you want more fine grained control you can subclass ImageView handle the touch events and directly manipulate the matrix of the canvas backing it during your onDraw calls.

It's a lot more complex but for my project it turned out to be the best solution.

0

精彩评论

暂无评论...
验证码 换一张
取 消