I call this function in my activity:
@Override public boolean dispatchTouchEvent(MotionEvent touchEvent)
This allows me to process the action before any components are focused or even devoid of attention to these elements.
PROBLEM : I was wondering how I could know which component (view) was affected in this function, then I could choose whether I want to advise the event or not.
COAL DECISION . I currently have an ugly solution that: I know the position of the component that is allowed to receive the event, and I have enough to approximately solve the user clicked on this component.
Thanks.
source share