Skip to content

Commit

Permalink
fix(Android): modify the decorFitsSystemWindow parameter in setNaviga…
Browse files Browse the repository at this point in the history
…tionBarHidden (#1988)

## Description

Currently when user tries to change the appearance of the navigation bar
(using navigationBarHidden / navigationBarColor props) the content of
the screen jumps to the place that does not respect safeAreaView. This
PR fixes it by removing `decorFitsSystemWindow` declaration, as it
breaks the interface by matching it to `fit system window`.

Resolves #1719.

## Changes

- Removed `decorFitsSystemWindow` call from `ScreenWindowTraits.kt`

## Checklist

- [X] Ensured that CI passes
  • Loading branch information
jiyong1 authored Dec 21, 2023
1 parent 336efc0 commit c2b68ba
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ object ScreenWindowTraits {
val screenForNavBarHidden = findScreenForTrait(screen, WindowTraits.NAVIGATION_BAR_HIDDEN)
val hidden = screenForNavBarHidden?.isNavigationBarHidden ?: false

WindowCompat.setDecorFitsSystemWindows(window, hidden)
if (hidden) {
WindowInsetsControllerCompat(window, window.decorView).let { controller ->
controller.hide(WindowInsetsCompat.Type.navigationBars())
Expand Down

0 comments on commit c2b68ba

Please sign in to comment.