android4.4 on the full screen interface to implement the Disable status bar dropdown

Source: Internet
Author: User

Google from KK began to increase the status bar transparent and full screen interface has notification can pull down the status bar design, and the hidden danger of this design is to set the Full_screen interface is unable to prohibit the status bar pull down, so that some engineering test app may have a certain impact, But with Google's default design, the app cannot modify the design to meet its needs. MTK Internal has been developed to provide a new interface to implement the full screen interface prohibit dropdown status bar, if your code does not have this part of the logic, please refer to the following:1. Frameworks\base\core\java\android\view\view.java
  public static final int system_ui_flag_immersive_sticky = 0x00001000;+    /**+     * @hide +     *+     * Note:flag for {@link #setSystemUiVisibility (int)}: It help user to disable transient+     * status bar triggered by gesture+     */+
   
    public static final int system_ui_flag_immersive_gesture_isolated = 0x00002000;
   



2. Frameworks\base\policy\src\com\android\internal\policy\impl\phonewindowmanager.java
 Monitor for system gestures Msystemgestures = new Systemgesturespointereventlistener (context, NE W systemgesturespointereventlistener.callbacks () {@Override public void Onswipefrom                        Top () {+ if (isgestureisolated ()) + return;                        if (Mstatusbar! = null) {requesttransientbars (Mstatusbar);                        }} @Override public void Onswipefrombottom () {+                        if (isgestureisolated ()) + return; if (Mnavigationbar! = null && mnavigationbaronbottom) {requesttransientbars (mnavigatio                        NBar);                        }} @Override public void Onswipefromright () {+            if (isgestureisolated ()) +                Return if (Mnavigationbar! = null &&!mnavigationbaronbottom) {requesttransientbars (Mnavigati                        OnBar); }} @Override public void OnDebug () {//N O-op}+ Private Boolean isgestureisolated () {+ WindowState WI n = mfocusedwindow! = null? mfocusedwindow:mtopfullscreenopaquewindowstate;+ if (win! = null && (win.getsystemuivisib                        Ility () & view.system_ui_flag_immersive_gesture_isolated)! = 0) + return true;+ else+ return false;+}});



3. After modifying the framework, add the test app to the Setsystemuivisibility API with system_ui_flag_immersive_gesture_isolated FLAG

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.