Android : Multi touch and TYPE_SYSTEM_OVERLAY

后端 未结 2 441
傲寒
傲寒 2020-12-02 11:56

I am trying to get multiple touch events on a system overlay view, but am only receiving the MotionEvent.ACTION_OUTSIDE event.

Is there any possible w

2条回答
  •  再見小時候
    2020-12-02 12:08

    Starting from Android 4.x, Android team Android team fixed a potential security problem by adding a new function adjustWindowParamsLw() in which it will add FLAG_NOT_FOCUSABLE, FLAG_NOT_TOUCHABLE and remove FLAG_WATCH_OUTSIDE_TOUCH flags for TYPE_SYSTEM_OVERLAY window.

    That's TYPE_SYSTEM_OVERLAY window won't receive any touch event on ICS platform.

    Updated: 2016/5/4 TYPE_TOAST cannot receive touch events on Android 4.0~4.3. It's the same as TYPE_SYSTEM_OVERLAY. On Android 4.4+, TYPE_TOAST removed from the excluded list, so you can use TYPE_TOAST to receive touch events on Android 4.4+ devices.

提交回复
热议问题