Repository navigation
fix(android): apply per-route activeTintColor when switching tabs - #599
Merged
thiagobrez merged 1 commit intoOct 20, 2026
Merged
Conversation
The selected item's tint was only recomputed when `items` changed. Tab switches only update `selectedPage`, and React's prop diffing skips `items` when its contents are unchanged, so a route's own `activeTintColor` was never applied after switching tabs. Recompute tint colors on selection change, and allow clearing the global active/inactive tint colors.
rjmreis
force-pushed
the
fix/android-route-active-tint-color
branch
from
October 15, 2026 11:20
9b54e92 to
757d3e8
Compare
thiagobrez
approved these changes
Oct 20, 2026
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.
PR Description
Bug fix. On Android,
activeTintColorset on a route (ortabBarActiveTintColorin a React Navigation screen'soptions) was ignored after switching tabs. The selected tab kept the colour it had when the tab bar mounted, which is usually the globaltabBarActiveTintColor.Root cause:
ReactBottomNavigationViewonly recomputed the tint colours when theitemsprop changed. A tab switch only changesselectedPage, and React's prop diffing doesn't senditemsagain when its contents haven't changed. SoupdateTintColors()never ran with the newly selected item.Changes:
RCTTabView.kt:setSelectedItemnow callsupdateTintColors(), so the selected route'sactiveTintColoris applied on every tab switch, falling back to the global colour.RCTTabViewManager.kt:nullvalues foractiveTintColor/inactiveTintColorare now passed through, so clearing the global prop resets to the theme default instead of keeping the previous colour.Both the standalone and React Navigation adapters use the same native path, so this fixes both. iOS already handled per-route colours correctly, so it's unchanged.
How to test?
red; Albums haspurpleand Contacts hasblue.iconRenderingMode: 'original', so only the label is tinted.Note: the Native Bottom Tabs (React Navigation) example currently crashes on
mainwith "Couldn't find a theme" for me after a fresh install, which looks like duplicate@react-navigation/nativecopies in the workspace. That's unrelated to this change, so I verified the fix with the standalone example.Screenshots
Before / after on an Android emulator (API 37):
activeTintColor_android_before_after.mp4