Context
I have an overlay window (TYPE_SYSTEM_ALERT) which is full screen.
The flag FLAG_NOT_TOUCHABLE is enabled so that underlying window gets the touch events.
The flag FLAG_WATCH_OUTSIDE_TOUCH is also enabled so that my overlay gets an ACTION_OUTSIDE event when a touch event happens.
Goal
If a touch event happens in a specific area of the screen, I would like my overlay to become ‘touchable’ and receive all following touch events (move, up,…).
What I tried
I tried to remove the FLAG_NOT_TOUCHABLE when receiving the ACTION_OUTSIDE but I don’t receive the touch events until the current series of touch is over (i.e ACTION_UP event).
Well I finally ended up using 2 overlay windows:
TYPE_SYSTEM_ALERTwithwrap_contentto catch touch events on the contentTYPE_SYSTEM_OVERLAYwithmatch_parentAnd I transfer my content view from one window to another when touch starts/ends.