hi friends,
I am trying to handle fling event in my custom view using gesture
detector but  onFling() method is not calling .code snippet for
handling fling follows

public class CustomView extends View {

private GestureDetector gestureDetector;

public CustomView6(Context context, AttributeSet ats, int
defaultStyle) {

    super(context, ats, defaultStyle);
 gestureDetector = new GestureDetector(new MyGestureDetector());

}

@Override
public boolean onTouchEvent(MotionEvent e) {

 Log.e(">>>>>>>>","ontouch");

             if (gestureDetector.onTouchEvent(e)) {
                 return true;
             }
             return false;
}

class MyGestureDetector extends SimpleOnGestureListener {
        @Override
        public boolean onFling(MotionEvent e1, MotionEvent e2, float
velocityX, float velocityY) {
            Log.e(">>>>>>","onFling");
            return true;
        }
    }

}


Am missing something? please help me...

Thanks and regards

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to