Skip to content

Instantly share code, notes, and snippets.

@misdake
Created July 24, 2013 05:37
Show Gist options
  • Save misdake/6068279 to your computer and use it in GitHub Desktop.
Save misdake/6068279 to your computer and use it in GitHub Desktop.
Activity "keep screen on" & "full screen, landscape"
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
//Full screen, landscape.
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
if (getRequestedOrientation() != ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE)
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment