Ongesturelistener Ondown Method Never Gets Called
My onScroll and areonTouchEvent getting called, but not the onDown method. In fact, when I log the distaceX in onDown I get several of them logged out, and the first is always rel
Solution 1:
Why don't you do something like:
@OverridepublicbooleanonTouchEvent(MotionEvent event) {
switch (event.getAction() & MotionEvent.ACTION_MASK) {
caseMotionEvent.ACTION_DOWN:
//Do something on action down.caseMotionEvent.ACTION_UP:
//Do something on action up.break;
caseMotionEvent.ACTION_MOVE:
//Do something when moving.break;
}
returntrue;
}
Hope this helps.
Post a Comment for "Ongesturelistener Ondown Method Never Gets Called"