I have a button and OnTouchListener attached to it. How can I find if motion (when user presses the button) happened inside or outside it? Both event.getAction() and event.getActionMasked() return only 0, 1 or 2, which is ActionDown, ActionUp, ActionMove, respectively. There's a constant MotionEvent.ACTION_OUTSIDE, which is 4, but somehow I don't receive it even if I drag touch outside the button - I still receive 2 from both methods. What's the problem?
UPD: I' ve found nice solution - just check focused state on view after ACTION_UP. If it's not focused, it means that movement happened outside the view.