I'm having problems trying to make an element respond differently when there is action like "click" or type "touch". When I click on the element (is a simple listener, not worth paste the code), it performs the action perfectly, but completely ignores the action of touch. That way I could associate the element to distinguish the two events?
Should I apply the listener to the children of the view that the action is executed?
Thanks.
Edit
Resolved!
Added a check on the use of the touch event before calling it.
@Override
public boolean dispatchTouchEvent(MotionEvent event) {
super.dispatchTouchEvent(event);
if (this.onTouchEvent(event))
return this.onTouchEvent(event);
else
return false;
}