Android floating box coverage and coverage, android floating box coverage
Introduction
The floating window is one of the features of the Android platform. It is very important to be proficient in using the floating window. When everyone uses the floating window, the current coverage and coverage problems become apparent.
In my contact with all apps, the best coverage of floating windows is a point where almost all other apps are covered.
Details
Classes involving floating windows: WindowManager, WindowManagerImpl, CompatModeWrapper (internal class of WindowManagerImpl), and LocalWindowManager (internal class of Window ).
After understanding its principles, let's write a project test. The test results are as follows:
When the View is of the same level (flag ID), the floating window that appears later overwrites the previous floating window.
Is there a way to overwrite all the floating windows?
I have several solutions:
1. The reflection mechanism clears all floating windows. (Implemented)
2. Find the maximum flag ID. (Implemented)
3. Check whether your floating window is overwritten. If it is overwritten, the window will pop up again. (Implemented)
Can the floating window monitor the return key?
At present, I have not found an effective solution. I wanted to intercept the event through the underlying layer and return it to the floating window. But I thought about it later. Simple programs are simple and don't make the program so complicated.
Well, I don't know much about it. The solution has already been listed. If you are interested, hurry and implement it.