问题
I was looking at an application (SwipePad), and noticed that after the application launches, it detects gestures across the entire platform, even after the main part of the application as been sent to the back (onPause... i.e. it isn't the current activity). It looks like it's using some kind of system service to keep itself alive, but how is it still getting the gesture from the bezel at the system level like that?
It also was interesting that the application itself isn't using root. Any thoughts?
回答1:
You can make layouts that can sit on top of all other windows. They will be running from a service.
Checkout: How to create an UI or a widget that sits on top of all applications in Android?
来源:https://stackoverflow.com/questions/11975865/gesture-listener-across-entire-device