Java Code Examples for android.widget.FrameLayout#getSystemUiVisibility()

The following examples show how to use android.widget.FrameLayout#getSystemUiVisibility() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MediaRouteControllerDialogFactory.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
void restoreSystemVisibility(Activity activity) {
    if (mRestoreSystemVisibility) {
        FrameLayout decor = (FrameLayout) activity.getWindow().getDecorView();
        // In some cases we come out of fullscreen before closing this dialog. In these
        // cases we don't want to restore the system UI visibility state.
        int systemVisibility = decor.getSystemUiVisibility();
        if ((systemVisibility & View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) != 0) {
            decor.setSystemUiVisibility(mSystemVisibility);
        }
    }
}
 
Example 2
Source File: BaseMediaRouteDialogManager.java    From 365browser with Apache License 2.0 5 votes vote down vote up
void restoreSystemVisibility(Activity activity) {
    if (!mWasFullscreenBeforeShowing) return;

    FrameLayout decor = (FrameLayout) activity.getWindow().getDecorView();
    // In some cases we come out of fullscreen before closing this dialog. In these
    // cases we don't want to restore the system UI visibility state.
    boolean isStillFullscreen =
            (decor.getSystemUiVisibility() & View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) == 0;
    if (!isStillFullscreen) return;

    decor.setSystemUiVisibility(mSystemVisibilityToRestore);
}
 
Example 3
Source File: BaseMediaRouteDialogManager.java    From 365browser with Apache License 2.0 5 votes vote down vote up
void saveSystemVisibility(Activity activity) {
    // If we are in fullscreen we may have also have hidden the system UI. This
    // is overridden when we display the dialog. Save the system UI visibility
    // state so we can restore it.
    FrameLayout decor = (FrameLayout) activity.getWindow().getDecorView();
    mSystemVisibilityToRestore = decor.getSystemUiVisibility();
    mWasFullscreenBeforeShowing = (
            (mSystemVisibilityToRestore & View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) != 0);
}
 
Example 4
Source File: MediaRouteControllerDialogFactory.java    From 365browser with Apache License 2.0 5 votes vote down vote up
void restoreSystemVisibility(Activity activity) {
    if (mRestoreSystemVisibility) {
        FrameLayout decor = (FrameLayout) activity.getWindow().getDecorView();
        // In some cases we come out of fullscreen before closing this dialog. In these
        // cases we don't want to restore the system UI visibility state.
        int systemVisibility = decor.getSystemUiVisibility();
        if ((systemVisibility & View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) != 0) {
            decor.setSystemUiVisibility(mSystemVisibility);
        }
    }
}
 
Example 5
Source File: MediaRouteControllerDialogFactory.java    From 365browser with Apache License 2.0 5 votes vote down vote up
void saveSystemVisibility(Activity activity) {
    // If we are in fullscreen we may have also have hidden the system UI. This
    // is overridden when we display the dialog. Save the system UI visibility
    // state so we can restore it.
    FrameLayout decor = (FrameLayout) activity.getWindow().getDecorView();
    mSystemVisibility = decor.getSystemUiVisibility();
    mRestoreSystemVisibility = (
            (mSystemVisibility & View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) != 0);
}
 
Example 6
Source File: MediaRouteChooserDialogFactory.java    From 365browser with Apache License 2.0 5 votes vote down vote up
void restoreSystemVisibility(Activity activity) {
    if (mRestoreSystemVisibility) {
        FrameLayout decor = (FrameLayout) activity.getWindow().getDecorView();
        // In some cases we come out of fullscreen before closing this dialog. In these
        // cases we don't want to restore the system UI visibility state.
        int systemVisibility = decor.getSystemUiVisibility();
        if ((systemVisibility & View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) != 0) {
            decor.setSystemUiVisibility(mSystemVisibility);
        }
    }
}
 
Example 7
Source File: MediaRouteChooserDialogFactory.java    From 365browser with Apache License 2.0 5 votes vote down vote up
void saveSystemVisibility(Activity activity) {
    // If we are in fullscreen we may have also have hidden the system UI. This
    // is overridden when we display the dialog. Save the system UI visibility
    // state so we can restore it.
    FrameLayout decor = (FrameLayout) activity.getWindow().getDecorView();
    mSystemVisibility = decor.getSystemUiVisibility();
    mRestoreSystemVisibility = (
            (mSystemVisibility & View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) != 0);
}
 
Example 8
Source File: BaseMediaRouteDialogManager.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
void restoreSystemVisibility(Activity activity) {
    if (!mWasFullscreenBeforeShowing) return;

    FrameLayout decor = (FrameLayout) activity.getWindow().getDecorView();
    // In some cases we come out of fullscreen before closing this dialog. In these
    // cases we don't want to restore the system UI visibility state.
    boolean isStillFullscreen =
            (decor.getSystemUiVisibility() & View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) == 0;
    if (!isStillFullscreen) return;

    decor.setSystemUiVisibility(mSystemVisibilityToRestore);
}
 
Example 9
Source File: BaseMediaRouteDialogManager.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
void saveSystemVisibility(Activity activity) {
    // If we are in fullscreen we may have also have hidden the system UI. This
    // is overridden when we display the dialog. Save the system UI visibility
    // state so we can restore it.
    FrameLayout decor = (FrameLayout) activity.getWindow().getDecorView();
    mSystemVisibilityToRestore = decor.getSystemUiVisibility();
    mWasFullscreenBeforeShowing = (
            (mSystemVisibilityToRestore & View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) != 0);
}
 
Example 10
Source File: MediaRouteChooserDialogFactory.java    From delion with Apache License 2.0 5 votes vote down vote up
void saveSystemVisibility(Activity activity) {
    // If we are in fullscreen we may have also have hidden the system UI. This
    // is overridden when we display the dialog. Save the system UI visibility
    // state so we can restore it.
    FrameLayout decor = (FrameLayout) activity.getWindow().getDecorView();
    mSystemVisibility = decor.getSystemUiVisibility();
    mRestoreSystemVisibility = (
            (mSystemVisibility & View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) != 0);
}
 
Example 11
Source File: MediaRouteControllerDialogFactory.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
void saveSystemVisibility(Activity activity) {
    // If we are in fullscreen we may have also have hidden the system UI. This
    // is overridden when we display the dialog. Save the system UI visibility
    // state so we can restore it.
    FrameLayout decor = (FrameLayout) activity.getWindow().getDecorView();
    mSystemVisibility = decor.getSystemUiVisibility();
    mRestoreSystemVisibility = (
            (mSystemVisibility & View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) != 0);
}
 
Example 12
Source File: MediaRouteChooserDialogFactory.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
void restoreSystemVisibility(Activity activity) {
    if (mRestoreSystemVisibility) {
        FrameLayout decor = (FrameLayout) activity.getWindow().getDecorView();
        // In some cases we come out of fullscreen before closing this dialog. In these
        // cases we don't want to restore the system UI visibility state.
        int systemVisibility = decor.getSystemUiVisibility();
        if ((systemVisibility & View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) != 0) {
            decor.setSystemUiVisibility(mSystemVisibility);
        }
    }
}
 
Example 13
Source File: MediaRouteChooserDialogFactory.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
void saveSystemVisibility(Activity activity) {
    // If we are in fullscreen we may have also have hidden the system UI. This
    // is overridden when we display the dialog. Save the system UI visibility
    // state so we can restore it.
    FrameLayout decor = (FrameLayout) activity.getWindow().getDecorView();
    mSystemVisibility = decor.getSystemUiVisibility();
    mRestoreSystemVisibility = (
            (mSystemVisibility & View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) != 0);
}
 
Example 14
Source File: BaseMediaRouteDialogManager.java    From delion with Apache License 2.0 5 votes vote down vote up
void restoreSystemVisibility(Activity activity) {
    if (!mWasFullscreenBeforeShowing) return;

    FrameLayout decor = (FrameLayout) activity.getWindow().getDecorView();
    // In some cases we come out of fullscreen before closing this dialog. In these
    // cases we don't want to restore the system UI visibility state.
    boolean isStillFullscreen =
            (decor.getSystemUiVisibility() & View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) == 0;
    if (!isStillFullscreen) return;

    decor.setSystemUiVisibility(mSystemVisibilityToRestore);
}
 
Example 15
Source File: BaseMediaRouteDialogManager.java    From delion with Apache License 2.0 5 votes vote down vote up
void saveSystemVisibility(Activity activity) {
    // If we are in fullscreen we may have also have hidden the system UI. This
    // is overridden when we display the dialog. Save the system UI visibility
    // state so we can restore it.
    FrameLayout decor = (FrameLayout) activity.getWindow().getDecorView();
    mSystemVisibilityToRestore = decor.getSystemUiVisibility();
    mWasFullscreenBeforeShowing = (
            (mSystemVisibilityToRestore & View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) != 0);
}
 
Example 16
Source File: MediaRouteControllerDialogFactory.java    From delion with Apache License 2.0 5 votes vote down vote up
void restoreSystemVisibility(Activity activity) {
    if (mRestoreSystemVisibility) {
        FrameLayout decor = (FrameLayout) activity.getWindow().getDecorView();
        // In some cases we come out of fullscreen before closing this dialog. In these
        // cases we don't want to restore the system UI visibility state.
        int systemVisibility = decor.getSystemUiVisibility();
        if ((systemVisibility & View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) != 0) {
            decor.setSystemUiVisibility(mSystemVisibility);
        }
    }
}
 
Example 17
Source File: MediaRouteControllerDialogFactory.java    From delion with Apache License 2.0 5 votes vote down vote up
void saveSystemVisibility(Activity activity) {
    // If we are in fullscreen we may have also have hidden the system UI. This
    // is overridden when we display the dialog. Save the system UI visibility
    // state so we can restore it.
    FrameLayout decor = (FrameLayout) activity.getWindow().getDecorView();
    mSystemVisibility = decor.getSystemUiVisibility();
    mRestoreSystemVisibility = (
            (mSystemVisibility & View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) != 0);
}
 
Example 18
Source File: MediaRouteChooserDialogFactory.java    From delion with Apache License 2.0 5 votes vote down vote up
void restoreSystemVisibility(Activity activity) {
    if (mRestoreSystemVisibility) {
        FrameLayout decor = (FrameLayout) activity.getWindow().getDecorView();
        // In some cases we come out of fullscreen before closing this dialog. In these
        // cases we don't want to restore the system UI visibility state.
        int systemVisibility = decor.getSystemUiVisibility();
        if ((systemVisibility & View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) != 0) {
            decor.setSystemUiVisibility(mSystemVisibility);
        }
    }
}