Created
January 24, 2013 03:31
-
-
Save westlinkin/4617409 to your computer and use it in GitHub Desktop.
kindle fire full screen
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
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_video_play); | |
setFullScreen(); | |
} | |
private void setFullScreen(){ | |
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); | |
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); | |
if (VERSION.SDK_INT >= VERSION_CODES.ICE_CREAM_SANDWICH) { | |
SDK14.setFullScreen(VideoPlayActivity.this); | |
} | |
Log.v("set full screen", "done"); | |
} | |
@TargetApi(14) | |
static class SDK14 { | |
public static void setFullScreen(Context context) { | |
Log.v("set full screen", "api 14"); | |
((Activity) context).getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment