Skip to content

Commit

Permalink
[Android] Force app to overlap with the display cutout
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenCWills authored and AJenbo committed Jul 3, 2024
1 parent 46d227c commit 01cbfb6
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.ViewTreeObserver;
import android.view.WindowManager;

import org.libsdl.app.SDLActivity;

Expand All @@ -23,6 +24,10 @@ protected void onCreate(Bundle savedInstanceState) {
if (Build.VERSION.SDK_INT >= 25)
trackVisibleSpace();

// Force app to overlap with the display cutout
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P)
getWindow().getAttributes().layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;

fileManager = new ExternalFilesManager(this);

migrateSaveGames();
Expand Down

0 comments on commit 01cbfb6

Please sign in to comment.