Skip to content

Commit

Permalink
Apply fullscreen for phone with notch
Browse files Browse the repository at this point in the history
  • Loading branch information
seven332 committed Apr 6, 2019
1 parent 43b1693 commit 981a7c7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/src/main/java/com/hippo/ehviewer/ui/GalleryActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,11 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
// Screen lightness
setScreenLightness(Settings.getCustomScreenLightness(), Settings.getScreenLightness());

// Cutout
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
getWindow().getAttributes().layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;
}

if (Settings.getGuideGallery()) {
FrameLayout mainLayout = (FrameLayout) ViewUtils.$$(this, R.id.main);
mainLayout.addView(new GalleryGuideView(this));
Expand Down

0 comments on commit 981a7c7

Please sign in to comment.