Xiaomi Adnroid the use of suspended frames is prohibited by default, resulting in the development of suspended boxes that cannot receive events

Source: Internet
Author: User

For example, you built a hover box:

WindowManager WindowManager = Getwindowmanager (context); int screenwidth = Windowmanager.getdefaultdisplay (). getWidth (); if (Smallwindow = = null) {Smallwindow = new Floatwindowsmallview (context); if (smallwindowparams = = null) {SMALLWINDOWP Arams = new Layoutparams (); smallwindowparams.type = Layoutparams.type_system_alert;smallwindowparams.format = Pixelformat.rgba_8888;smallwindowparams.flags = layoutparams.flag_not_touch_modal| layoutparams.flag_not_focusable;smallwindowparams.gravity = Gravity.left | Gravity.top;smallwindowparams.width = Floatwindowsmallview.viewwidth;smallwindowparams.height = floatwindowsmallview.viewheight;smallwindowparams.x = Screenwidth;smallwindowparams.y = 0; Smallwindow.setvoipuipaddingbottom (paddingbottom);} Smallwindow.setparams (Smallwindowparams); Windowmanager.addview (Smallwindow, smallwindowparams);}

If you use a Xiaomi phone, you will find that the window receives no messages, the message will be transmitted to the next layer, if the next layer has no recipients, will be received. You can receive messages when you set the hover box of your app to allow in the "Security Center", "Authorization Management"->[app Rights Management]-> "Rights Management". This should be a unique place for Xiaomi Rom, and there is no such situation with other mobile phone tests. So the development of Android is not good, fragmentation is too serious, each has its own characteristics.

Xiaomi Adnroid the use of suspended frames is prohibited by default, resulting in the development of suspended boxes that cannot receive events

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.