-
-
Notifications
You must be signed in to change notification settings - Fork 606
feat(Android): deprecate series of status/navigation bar related props #2638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
8 tasks
kkafar
pushed a commit
to react-navigation/react-navigation
that referenced
this pull request
Apr 9, 2025
…rops (#12539) **Motivation** For all apps targeting Android SDK 35 the edge-to-edge mode is enabled by default (it is effectively enforced, opting out takes some effort) and everything indicates that it will be enforced in future SDKs. For SDKs below 35 the status / navigation bar APIs affected by this PR are deprecated or deprecated & disabled. For details please see this PR: software-mansion/react-native-screens#2638 `react-native-screens` deprecated `navigationBarColor`, `navigationBarTranslucent`, `statusBarColor`, `statusBarTranslucent` props. This PR makes them deprecated also in `react-navigation/native-stack`. `topInsetEnabled` was also deprecated. No changes connected with this prop has been implemented yet.
Merged
1 task
kligarski
added a commit
that referenced
this pull request
May 9, 2025
…rops in native code (#2913) ## Description Deprecate native props and methods related to status/navigation bars that will be no longer relevant after edge-to-edge is enforced (they were deprecated already in this PR: #2638). ## Changes - deprecate deprecate status/navigation bar edge to edge related props in native code - add EdgeToEdge detection utility - prevent adding `ScreenWindowTraits`' `windowInsetsListener` to `InsetsObserverProxy` if edge-to-edge is enabled ## Checklist - [ ] Ensured that CI passes
1 task
kligarski
added a commit
that referenced
this pull request
Oct 1, 2025
…precated by edge-to-edge enforcement (#3264) ## Description Removes native code related to `statusBarColor`, `statusBarTranslucent`, `navigationBarColor`, `navigationBarTranslucent`, `topInsetEnabled` props. Retained in JS for backward compatibility. For reasons why those props are deprecated, please see #2638. After this PR is merged, we should prepare corresponding PRs to `react-navigation` and `react-navigation`'s docs. I created an issue to handle it: software-mansion/react-native-screens-labs#487. Closes #2632. Closes software-mansion/react-native-screens-labs#485. ## Changes - remove native code related to `statusBarColor`, `statusBarTranslucent`, `navigationBarColor`, `navigationBarTranslucent`, `topInsetEnabled` props - remove usage of those props in example apps (with appropriate comment to maintain full context of the tests) - remove `edge-to-edge` detection and `react-native-is-edge-to-edge` ## Test code and steps to reproduce Verify that app builds and runs. ## Checklist - [ ] Ensured that CI passes
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.
Description
Important context
For all apps targeting Android SDK 35 the edge-to-edge mode is enabled by default (it is effectively enforced, opting out takes some effort) and everything indicates that it will be enforced in future SDKs.
For SDKs below 35 the status / navigation bar APIs affected by this PR are deprecated or deprecated & disabled (see above links ☝🏻 ).
Currently minimal target sdk level for google app store is 34 (source). We can't really foresee when SDK level 35 will be required, however it can be clearly seen that edge-to-edge will be the promoted and supported way of designing UI on Android.
We want to get rid of these props for one more reason. These are Android-specific props and translucency is implemented by (not) consuming appropriate window insets, which leads to conflicts with other libs and we can't set right defaults, since it is not really possible to detect whether the app is in edge to edge or not leading to some buggy behaviour (initial content jump etc.).
Changes
Test code and steps to reproduce
No runtime changes.
Checklist