What is the difference between a view\'s onTouchEvent
:
public class MyCustomView extends View {
// THIS :
@Override
public boolean on
Answer by LeeYiHong is correct, and the other very important thing is what is written at http://developer.android.com/reference/android/view/View.OnTouchListener.html:
The callback
[i.e. View.OnTouchListener -> onTouch(View v, MotionEvent event)]
will be invoked before the touch event[i.e. onTouchEvent(MotionEvent)]
is given to the view.