What actually happens if I return false in a OnTouchListener?
android, java, ontouchlistener, return
Solution
From the View documentation:
Returns
True if the listener has consumed the event, false otherwise.
If you return `true` you tell android that the press is taken care of. Forget it.
If you return `false` you basically say "Not my problem, Someone else will have to take care of this click". Then android will pass the event down to other views, which could be under your view.
Problem
I am creating a game that requires a `SurfaceView` to implement `OnTouchListener`. During the game I want to pause the Listener for some specific time.I tried returning false from the `onTouch()` method , but still the method keeps executing.Is there any other way to have the listener paused for sometime? And anyone please explain what returning false from `onTouch()` actually mean?