Code example for FragmentActivity

Methods: getWindow

0
    public static double getCenterLongitude() { 
        return 0.0; 
    } 
 
    public void setFullScreen(boolean enable) {
        Window window = getWindow();
        if (enable) {
            window.clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
            window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
        } 
        else { 
            window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
            window.setFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN, WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
        } 
    } 
     
}