Skip to content

Edge2edge android#8262

Open
markdevocht wants to merge 37 commits intomasterfrom
feat/edge2edge-android
Open

Edge2edge android#8262
markdevocht wants to merge 37 commits intomasterfrom
feat/edge2edge-android

Conversation

@markdevocht
Copy link
Copy Markdown
Contributor

@markdevocht markdevocht commented Mar 30, 2026

Android Edge-to-Edge Support

Adds opt-in edge-to-edge display support for Android 15+ (API 35), where the system enforces edge-to-edge by default.

Key changes

  • Theme-based opt-in — Edge-to-edge is disabled by default. Apps opt in by setting android:windowOptOutEdgeToEdgeEnforcement to false in their theme. NavigationActivity.enableEdgeToEdge() reads this attribute and calls EdgeToEdge.enable() accordingly. The method is protected and overridable for custom behavior.
  • View-based system bar backgrounds — Replaced deprecated window.statusBarColor / window.navigationBarColor APIs with view-based backgrounds in SystemUiUtils. A status bar background view is sourced from the DecorView, and a navigation bar background view is created and sized dynamically via WindowInsetsCompat. Both fall back to the deprecated window APIs when edge-to-edge is not active.
  • Correct inset handling for SafeAreaViewComponentViewController.onApplyWindowInsets now correctly passes navigation bar insets through to React Native's SafeAreaView when edge-to-edge is active, so content is properly inset from the system navigation bar. When edge-to-edge is off, only IME insets are forwarded (preserving existing behavior).
  • Bottom tabs edge-to-edge awarenessBottomTabsPresenter and BottomTabsContainer account for navigation bar insets when drawing behind system bars.
  • Gesture vs 3-button detectionSystemUiUtils detects the navigation mode (gesture vs 3-button) at runtime via tappable element insets, applying appropriate default opacity for the navigation bar background.
  • E2E snapshot updates — Updated baseline screenshots for BottomTabs stylizing tests and overlay banner test to match the current rendering.

https://wix.atlassian.net/browse/WOAINFRA-3303

d4vidi and others added 25 commits March 5, 2025 17:23
…8053) (#8076)

Co-authored-by: NormanWangEndeavor <145947285+NormanWangEndeavor@users.noreply.github.com>
# Conflicts:
#	android/build.gradle
#	android/src/main/java/com/reactnativenavigation/utils/SystemUiUtils.kt
#	android/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/Presenter.java
#	android/src/main/java/com/reactnativenavigation/views/bottomtabs/BottomTabsContainer.kt
#	e2e/SideMenu.test.js
#	e2e/assets/overlay_banner_padding.png
#	lib/android/app/build.gradle
#	lib/android/app/src/main/java/com/reactnativenavigation/utils/ColorUtils.java
#	lib/android/app/src/main/java/com/reactnativenavigation/utils/ReactViewGroup.kt
#	lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/Presenter.java
#	lib/android/app/src/main/java/com/reactnativenavigation/views/bottomtabs/BottomTabsLayout.java
#	lib/android/app/src/main/java/com/reactnativenavigation/views/element/animators/BackgroundColorAnimator.kt
#	lib/android/app/src/main/java/com/reactnativenavigation/views/element/animators/BackgroundColorEvaluator.kt
#	lib/android/app/src/reactNative71/java/com/reactnativenavigation/react/modal/ModalContentLayout.kt
#	lib/android/app/src/test/java/com/reactnativenavigation/TestApplication.java
#	lib/android/app/src/test/java/com/reactnativenavigation/mocks/TitleBarReactViewCreatorMock.java
#	lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/attacher/modes/AttachModeTest.java
#	lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/child/ChildControllerTest.java
#	lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/child/ChildControllersRegistryTest.java
#	lib/ios/RNNAppDelegate.mm
#	package.json
#	playground/android/settings.gradle
#	playground/package.json
#	yarn.lock
@markdevocht markdevocht requested a review from yedidyak April 9, 2026 13:31
@markdevocht markdevocht requested a review from yedidyak April 12, 2026 05:43
…when edge-to-edge activates

activateEdgeToEdge() is the action method — it does both EdgeToEdge.enable(this) and SystemUiUtils.activateEdgeToEdge(), so it's impossible to enable Android edge-to-edge without also setting RNN's internal flag
The docs now show activateEdgeToEdge() in the override example instead of EdgeToEdge.enable(this)
Copy link
Copy Markdown
Contributor

@yedidyak yedidyak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed after the latest edge-to-edge follow-up changes. The remaining override-path concern now looks addressed: custom overrides are routed through activateEdgeToEdge(), and the docs match that contract.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants