Browse Source

[Android] Force app to overlap with the display cutout

pull/7379/head
staphen 2 years ago committed by Anders Jenbo
parent
commit
7946eb8875
  1. 5
      android-project/app/src/main/java/org/diasurgical/devilutionx/DevilutionXSDLActivity.java

5
android-project/app/src/main/java/org/diasurgical/devilutionx/DevilutionXSDLActivity.java

@ -7,6 +7,7 @@ import android.os.Bundle;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.ViewTreeObserver;
import android.view.WindowManager;
import org.libsdl.app.SDLActivity;
@ -23,6 +24,10 @@ public class DevilutionXSDLActivity extends SDLActivity {
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();

Loading…
Cancel
Save