The question comes from an article: Why does the QQ background of mobile phone not clear out? MIUI Engineer: 1-megapixel page for your entire lives
Out of curiosity, want to know what this pixel in the end is what, with the mobile phone security Butler control QQ suspended window permissions:
Closed QQ suspended window permissions, through the background of a key cleanup, reopen QQ, found to have started from splash;
Open QQ suspended window permission, a key to clean up, open QQ, found that it is directly into the main interface; Note that a key to clean up the QQ, or clean up, QQ has since started.
As for, is not cleaned or self-priming, back to explore, here to talk about this one-pixel suspension window.
Button button = New button (Getapplicationcontext ()); WindowManager wm = (WindowManager) getapplicationcontext () . Getsystemservice (context.window_service); Windowmanager.layoutparams wmparams = new Windowmanager.layoutparams (); /** * The following are windowmanager.layoutparams related properties for specific purposes please refer to the SDK documentation * /wmparams.type = Layoutparams.type_phone;// Here is the key, you can also try 2003 Wmparams.format = pixelformat.rgba_8888;//Set the picture format, the effect is transparent background /** * The flags here are also critical. The code is actually wmparams.flags |= flag_not_focusable; * 40 is the origin of the Wmparams default property (+) + flag_not_focusable (8) */ wmparams.flags = Layoutparams.flag_not_touch_modal | Layoutparams.flag_not_focusable | layoutparams.flag_not_touchable; Wmparams.width = +; Wmparams.height = +; Wm.addview (button, wmparams); CREATE view
Add permissions
<uses-permission android:name= "Android.permission.SYSTEM_ALERT_WINDOW"/>
It's just that simple. Adding a hover window will always show the button, regardless of whether you return to launcher or open any application.
QQ of this suspension window is done relatively small, should still be transparent, also will put in pull over or corner, if through this suspended window to ensure QQ always in the background process, take me to explore again.
Mobile QQ backstage clean not off the secret--anddroid suspended window