Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make SDL fullscreen windows on Android actually fullscreen
  • Loading branch information
slouken committed Nov 2, 2017
1 parent c954b53 commit bb8c3a9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
Expand Up @@ -211,6 +211,20 @@ public void onClick(DialogInterface dialog,int id) {

setContentView(mLayout);

/*
* Per SDL_androidwindow.c, Android will only ever have one window, and that window
* is always flagged SDL_WINDOW_FULLSCREEN. Let's treat it as an immersive fullscreen
* window for Android UI purposes, as a result.
*/
int iFlags =
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY |
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
View.SYSTEM_UI_FLAG_FULLSCREEN;

getWindow().getDecorView().setSystemUiVisibility(iFlags);

// Get filename from "Open with" of another application
Intent intent = getIntent();
if (intent != null && intent.getData() != null) {
Expand Down

0 comments on commit bb8c3a9

Please sign in to comment.