Android Touchevent - Pinch gesture -
i looking @ scalegesturedetector
class. http://developer.android.com/reference/android/view/scalegesturedetector.html
i have 2 method's zoom-in , zoomout
. method should over-ride call these 2 methods.
private class scalelistener extends scalegesturedetector.simpleonscalegesturelistener {@ override public boolean onscale(scalegesturedetector detector) { return true; } override public boolean onscalebegin(scalegesturedetector detector) { return true; } override public boolean onscaleend(scalegesturedetector detector) { } }
let's take when pinch-up, want call zoom-in
, pinch-down want call zoom-out
.
you need scale factor calling scalegesturedetecteor.getscalefactor() inside of onscale
method. if less one, zooming out, otherwise - zooming in
Comments
Post a Comment