-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Fix SDK35 Bottom-tab positioning #7991
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes bottom-tab positioning for apps targeting SDK35 by updating view controller visibility handling and adjusting status bar and tab animations to support edge-to-edge layouts. Key changes include refactoring of status bar options via a dedicated StatusBarPresenter, introduction of new visibility info data classes, and removal of deprecated imports and legacy status bar methods.
Reviewed Changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lib/android/app/src/test/java/com/reactnativenavigation/mocks/TitleBarReactViewCreatorMock.java | Removed duplicate static import of Mockito.mock. |
| lib/android/app/src/test/java/com/reactnativenavigation/BaseTest.kt | Initializes feature toggles by invoking RNNFeatureToggles.init(). |
| lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/ViewControllerVisibilityInfo.kt | Introduces new visibility info data classes for view controllers and top bars. |
| lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/ViewController.java | Adds onSelected/onDeselected methods and replaces status bar controller with push/pop animation methods. |
| lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/StatusBarColorAnimator.kt | Implements status bar color animations with translucency handling. |
| lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/Presenter.java | Refactors status bar option applications to use the new StatusBarPresenter. |
| lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/statusbar/StatusBarPresenter.kt | Entirely new implementation managing status bar behaviors and animations. |
| lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/TopBarController.kt | Adds view visibility info and a new bindNewViewController method to animate top bar transitions. |
| lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/statusbar/StatusBarPresenter.kt | Removed legacy status bar presenter interface. |
| lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/statusbar/StatusBarController.kt | Removed legacy status bar controller interface. |
| lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/StackPresenter.java | Updates status bar animation invocations to leverage the new methods. |
| lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/StackController.java | Passes new view controller visibility info up through the stack controller. |
| lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/component/ComponentViewController.java | Removes dependency on legacy status bar controller interface and forwards animation calls. |
| lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/component/ComponentPresenter.java | Updates push/pop animation methods to use the new StatusBarPresenter. |
| lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsController.java | Adjusts bottom tab view handling and insets application, and updates tab selection behavior. |
| lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabPresenter.java | Removes an unused import related to bottom tabs text view. |
| lib/android/app/src/main/java/com/reactnativenavigation/utils/SystemUiUtils.kt | Removes unused Build import and simplifies status bar color setting logic. |
| lib/android/app/src/main/java/com/reactnativenavigation/utils/ColorUtils.java | Adds helper methods for checking lightness and setting alpha on colors. |
| lib/android/app/src/main/java/com/reactnativenavigation/NavigationActivity.java | Initializes the new StatusBarPresenter and cleans up obsolete imports. |
| lib/android/app/src/main/java/com/reactnativenavigation/FeatureToggles.kt | Renames and adds new feature toggles for top bar color animations. |
...app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/TopBarController.kt
Show resolved
Hide resolved
cfe2e15 to
a2e6ec6
Compare
Fix bottom-tab positioning for apps targeting SDK35 (i.e. with edge-to-edge layout by default), which otherwise does not account for the bottom window inset and is therefore laid out under the navigation bar (e.g. in the 3-button mode).
Before:

After:

(in edge-to-edge the 3-btn nav bar is [80% transparent by default])
Note: This does not in any way introduce complete support for SDK35. There are still numerous adjustments to be made (see #7978).
@yedidyak @Yoavpagir