开发者

Android SimpleOnScaleGestureListener Scale start

I have a SimpleOnScaleGestureListener implemented over a View, and whenever I put two (and more) fingers on the Screen, It registers that a Scale gesture begun. Actually, I want the scale gesture to begin when the fingers are moving, not when they are DOWN on the screen.

How can I tell the real scaling begun? The onScaleBegin and onScaleEnd register also that the Scaling begi开发者_如何学Cns when the fingers go DOWN on the screen, not when they're moving just as I expected.


By default, onScaleBegin is called when the second finger touches the screen.What you need is to overwrite onScale - that fires when you start moving your fingers. You can also keep the initial value of detector.getScaleFactor from onScaleBegin's parameter and act when that changes, but that would be more complicated.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜