In android, most event listener methods return a boolean value. What does true / false mean? what does this lead to subsequence events?
class MyTouchListener implements OnTouchListener { @Override public boolean onTouch(View v, MotionEvent event) { logView.showEvent(event); return true; } }
Regarding the above example, if return true in the onTouch method, I found that every touch event (DOWN, UP, MOVE, etc.) was recorded according to my log >. Conversely, if return is false, then the DOWN event occurs. Therefore, it seems that return false will prevent the event from propagating. Am I right?
In addition, in OnGestureListener many methods must also return a boolean value. Do they have the same meaning?
android events return listener touch
John Wang Sep 20 '10 at 23:51 2010-09-20 23:51
source share