Created
June 13, 2014 03:45
-
-
Save douzifly/176d8072e0c0a2665379 to your computer and use it in GitHub Desktop.
Android FullScreen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void setFullScreen(Window window, boolean fullScreen) { | |
if (fullScreen) { | |
window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); | |
} else { | |
window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); | |
} | |
} | |
public static boolean isFullScreen(Window window) { | |
return (window.getAttributes().flags & WindowManager.LayoutParams.FLAG_FULLSCREEN) != 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment