From 6ed3aed8ad937cf3cc3ad1b6e2989fbd28384108 Mon Sep 17 00:00:00 2001
From: smdyv <88971341+smdyv@users.noreply.github.com>
Date: Sun, 20 Feb 2022 21:21:25 +0100
Subject: [PATCH] Display content edge-to-edge
---
app/src/main/java/org/grapheneos/pdfviewer/PdfViewer.java | 3 +++
app/src/main/res/values-night/styles.xml | 1 +
app/src/main/res/values/styles.xml | 1 +
3 files changed, 5 insertions(+)
diff --git a/app/src/main/java/org/grapheneos/pdfviewer/PdfViewer.java b/app/src/main/java/org/grapheneos/pdfviewer/PdfViewer.java
index 96d9cfe..4e049f2 100644
--- a/app/src/main/java/org/grapheneos/pdfviewer/PdfViewer.java
+++ b/app/src/main/java/org/grapheneos/pdfviewer/PdfViewer.java
@@ -28,6 +28,7 @@ import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
+import androidx.core.view.WindowCompat;
import androidx.core.view.WindowInsetsCompat;
import androidx.loader.app.LoaderManager;
import androidx.loader.content.Loader;
@@ -157,6 +158,8 @@ public class PdfViewer extends AppCompatActivity implements LoaderManager.Loader
setContentView(binding.getRoot());
setSupportActionBar(binding.toolbar);
+ WindowCompat.setDecorFitsSystemWindows(getWindow(), false);
+
// Margins for the toolbar are needed, so that content of the toolbar
// is not covered by a system button navigation bar when in landscape.
ViewCompat.setOnApplyWindowInsetsListener(binding.toolbar, (v, windowInsets) -> {
diff --git a/app/src/main/res/values-night/styles.xml b/app/src/main/res/values-night/styles.xml
index 3743572..967fd72 100644
--- a/app/src/main/res/values-night/styles.xml
+++ b/app/src/main/res/values-night/styles.xml
@@ -5,6 +5,7 @@
- #DEFFFFFF
- #212121
+ - @android:color/transparent
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index a3ed4e9..183233f 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -5,6 +5,7 @@
- #000000
- #212121
+ - @android:color/transparent