I can't implement onFling, onScroll and more methods

I am trying to work with OnGestureListener , like I saw here : http://mrbool.com/how-to-work-with-swipe-gestures-in-android/28088

My goal is to move some Canvas Rectangle view to the right with swipe. I want the rectangle to get moved to the right out of the screen, so I created a thread which refresh the screen every [x] seconds, and I created a method : moveRight() for the rectangle, the method just increases the X point of the rectangle. Everything till here is working fine.

  • Where the problem is :
  • When I implements OnGestureListener interface in the activity, the methods I can implement are : onGesture , onGestureCancelled , onGestureEnded , onGestureStarted . For some reason, I can't implement onFling , onScroll and the rest known methods.

    I work with minimum Android 2.2 Froyo. What can I do to solve this ?

    Thanks guys.

    链接地址: http://www.djcxy.com/p/91300.html

    上一篇: Android onFling()方法不会触发

    下一篇: 我无法实现onFling,onScroll和更多方法