figured it out, I need set onTouchListener to the view and in the onTouch
method, call onTouchEvent(event). Thus try to capture "Fling" firstly, if
false returned, onClick() will be fired by Android.
@Override
public boolean onTouch(View view, MotionEvent event) {
switch(view.get
If I put Log.i() in onTouchEvent(), onClick() and onFling.
It seems onTouch will never be fired.
@Override
public boolean onTouchEvent(MotionEvent event) {
Log.i("Touched", "onTouchEvent");
if (mGestureDetector.onTouchEvent(event)) {
return true;
}
2 matches
Mail list logo