Skip to content

Commit

Permalink
Display content edge-to-edge
Browse files Browse the repository at this point in the history
  • Loading branch information
smdyv authored and thestinger committed Feb 23, 2022
1 parent 587d3a5 commit 6ed3aed
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/src/main/java/org/grapheneos/pdfviewer/PdfViewer.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
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;
Expand Down Expand Up @@ -157,6 +158,8 @@ protected void onCreate(Bundle savedInstanceState) {
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) -> {
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-night/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<!-- Customize your theme here. -->
<item name="colorPrimary">#DEFFFFFF</item>
<item name="android:statusBarColor">#212121</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
</style>

<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.Material3.Dark" />
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<!-- Customize your theme here. -->
<item name="colorPrimary">#000000</item>
<item name="android:statusBarColor">#212121</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
</style>

<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.Material3.Dark" />
Expand Down

0 comments on commit 6ed3aed

Please sign in to comment.