Android e2e drawBehind configuration#8315
Merged
Merged
Conversation
yedidyak
previously approved these changes
May 26, 2026
…drawBehind # Conflicts: # android/src/main/java/com/reactnativenavigation/utils/SystemUiUtils.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Android edge-to-edge:
navigationBar.drawBehindSummary
Adds
navigationBar.drawBehindso apps on Android 15+ edge-to-edge can draw content behind the system navigation bar while keeping it visible (gesture pill or 3-button bar). Fixes incorrect bottom insets and bottom-tabs padding when the nav bar should be transparent or use a scrim overlay instead of reserving layout space.Problem
On API 35+ with edge-to-edge enabled, apps could not get the combination users expect:
navBarBackgroundViewblocked transparencysystemBarsinsetsWorkarounds were limited:
navigationBar.visible: false— hides the pill (not acceptable when gestures should stay visible)backgroundColorwithout draw-behind — content inset above a solid barSolution
New option:
navigationBar.drawBehind(Android only).drawBehind: truewithvisible: true(or omitted):backgroundColorwhen not transparentTraditional behavior is unchanged when
drawBehindis false/omitted andbackgroundColoris opaque: content is inset above the navigation bar.shouldDrawBehind()also treats a transparentbackgroundColoras draw-behind whendrawBehindis not explicitly set tofalse.Implementation
NavigationBarOptionsdrawBehind;shouldDrawBehind(),isDrawBehindAndVisible()NavigationActivity.activateEdgeToEdge()EdgeToEdge.enable(),setDecorFitsSystemWindows(false), disable nav-bar contrast enforcement, transparent window nav/status colorsSystemUiUtilssetNavigationBarContrastEnforced(); overlay hide viahideOverlayonsetNavigationBarBackgroundColor(); sharedgetContentBottomSystemBarInset()/getBottomTabsSystemBarPadding()PresenterComponentViewControllerBottomTabsControllersystemBarspadding when draw-behind + visible; refresh insets on child nav-bar option changesBottomTabsPresentershouldDrawBehind()Options.ts,options-navigationBar.mdx,style-edge-to-edge.mdxAPI
See Navigation Bar options and Edge-to-Edge guide.
App setup (consumers)
Edge-to-edge must be enabled in the host app:
android:windowOptOutEdgeToEdgeEnforcement=false(API 35+)NavigationActivity.enableEdgeToEdge()and callactivateEdgeToEdge()when appropriateWix Engine apps still need a separate change: flip per-brand opt-out and remove legacy
window.statusBarColorusage inMainActivity— not included in this PR.Limitations
visible: falseto hide the entire system navigation bar (pill included).navigationBaris Android-only — no iOS equivalent (usebottomTabs.drawBehind/bottomTabs.visibleon iOS).Breaking changes
None. New option only; default behavior matches previous releases when
drawBehindis not set.Examples:
