feat(Android, Tabs): Add support for selectedIcon on Android#3633
Open
feat(Android, Tabs): Add support for selectedIcon on Android#3633
Conversation
kligarski
reviewed
Feb 12, 2026
android/src/main/java/com/swmansion/rnscreens/gamma/tabs/TabsHostAppearanceApplicator.kt
Outdated
Show resolved
Hide resolved
kligarski
reviewed
Feb 16, 2026
android/src/main/java/com/swmansion/rnscreens/gamma/tabs/TabsHostAppearanceApplicator.kt
Show resolved
Hide resolved
kligarski
reviewed
Feb 17, 2026
Contributor
kligarski
left a comment
There was a problem hiding this comment.
I noticed that if you use image as an icon, you cannot clear the icon later in the runtime:
Screen.Recording.2026-02-17.at.16.28.22.mov
The same happens for regular icon (so it's probably not a regression introduced in this PR but selectedIcon suffers from the same problem -> not sure if we need to handle it in this PR or not).
Contributor
Author
Reproducible on main either, I'm creating a ticket for that, as it's unrelated to these changes. https://github.com/software-mansion/react-native-screens-labs/issues/975 |
kligarski
approved these changes
Feb 17, 2026
5 tasks
This commit includes logic for selecting the icon in TabsHostAppearanceApplicator by @Kasendwa. Co-authored-by: Ronald Kasendwa <rkasendwa@outlook.com>
d52420d to
3aacd08
Compare
t0maboro
commented
Feb 23, 2026
| * for `selectedIcon` prop for BottomTabs on Android. To allow backward compatibility, | ||
| * we expose a way to check whether the new implementation is in use or not. | ||
| */ | ||
| isSelectedIconSupportedForAndroidBottomTabs: true, |
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.
Description
This PR adds support for the
selectedIconprop on Android. I'm not sure why it was omitted initially, but it's possible to implement it by checking whether the tab is focused. To maintain backward compatibility, I've extended the existing type with an alternative to support both current and previous behavior.Caution
The type for
selectedIconwas intentionally changed fromPlatformIconIOStoPlatformIcon. Since tabs are still an experimental component, we want to avoid additional maintenance overhead. This change is shipped with a compatibility flag.Closes: https://github.com/software-mansion/react-native-screens-labs/issues/954 (let me split the original issue 773 from labs to 2 separate sub-issues, as they touch completely different mechanisms)
Changes
Before & after - visual documentation
(No before section, new API)
selectedIcon.mov
Test plan
I've updated TestBottomTabs to use selectedIcon of type PlatformIcon. All other examples using that prop were intentionally left unchanged for regression testing.
Checklist