开发者

onFling and onSCroll methods are not detecting on Android Canvas?

开发者 https://www.devze.com 2023-03-29 15:39 出处:网络
In my sample app, I\'m drawing a view using a Canvas and GestureDetector. For开发者_开发百科 the OnGestureListener, all methods are working except onFling and onScroll.

In my sample app, I'm drawing a view using a Canvas and GestureDetector. For开发者_开发百科 the OnGestureListener, all methods are working except onFling and onScroll.

Can anybody sugest me how I can detect the Fling and Scroll gestures on the Canvas.

Thanks


Make sure your onDown method in your GestureListener class is returning true. OnFling and OnScroll won't fire without the OnDown returning true.

0

精彩评论

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