The only time you should return false from onDown() is if you truly want to ignore an entire gesture.
That pretty much says it all.
The point is the onDown(...)
method receives a MotionEvent
as a parameter, You have the option to analyse the MotionEvent
in the onDown(...)
method and if it isn't something you want to handle then you return false
.
A MotionEvent
carries a lot of detailed information which includes position of the start of the gesture (for example) - if it's outside of an area you want to handle then return false
otherwise return true
.
If you return true
from onDown(...)
the other methods will then be called. Each of those methods again have the option to analyse and handle the various parameters passed to them. If you handle an event in any of those methods and don't want any further action then return true from those methods otherwise the other methods will be called (possibly in a super class depending on your code implementation).
Gestures are complex and involve down and up actions as well as movement in any direction. Allowing the option to reject a gesture (by returning false
in onDown(...)
) makes things more versatile.
EDIT: In some situations there may be a case where you have multiple views on a screen. The MotionEvent
passed to onDown(...)
will contain information about where the gesture starts. If you don't wan't some areas of your screen to react to gestures then you return false
when you've checked the start position of the gesture.