android.widget.FrameLayout#getSystemUiVisibility ( )源码实例Demo

下面列出了android.widget.FrameLayout#getSystemUiVisibility ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: delion   文件: MediaRouteChooserDialogFactory.java
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);
}
 
源代码2 项目: delion   文件: MediaRouteChooserDialogFactory.java
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);
        }
    }
}
 
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);
}
 
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);
        }
    }
}
 
源代码5 项目: delion   文件: BaseMediaRouteDialogManager.java
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);
}
 
源代码6 项目: delion   文件: BaseMediaRouteDialogManager.java
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);
}
 
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);
}
 
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);
        }
    }
}
 
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);
}
 
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);
        }
    }
}
 
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);
}
 
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);
}
 
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);
}
 
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);
        }
    }
}
 
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);
}
 
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);
        }
    }
}
 
源代码17 项目: 365browser   文件: BaseMediaRouteDialogManager.java
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);
}
 
源代码18 项目: 365browser   文件: BaseMediaRouteDialogManager.java
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);
}