Android floating box coverage and coverage, android floating box coverage

Source: Internet
Author: User

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.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.