How to use showOverlay
within bottomTabs
?
#7218
Unanswered
jeremybarbet
asked this question in
Q&A
Replies: 1 comment 2 replies
-
@swabbass Sorry to tag you, would this make more sense to move that as an issue since the discussions doesn't seem to be very active? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all!
I'm trying to open an overlay using a
buttonTab
from mybottomTabs
. As far as I can see there is no option for it. This is how my bottom tabs look like:It's a behavior that can be found on iOS apps like YouTube or Reddit with the middle button opening a bottom sheet from any screen you are located at.
I've seen theses issues #6384, #6522 about having a custom component for the bottom tabs but in my case I simply want to use the native bottom tabs and just use a different icon/action to open my overlay.
I was trying to look into the native code and I believe the logic is handled here https://github.com/wix/react-native-navigation/blob/fab85c8ab9bb5ed323f3e005b44078a13195bca5/lib/ios/RNNBottomTabsController.m at least for iOS, I didn't look into Android.
As a workaround, I'm opening an overlay when the app is opened, to show the middle button and use an
showOverlay
function within the component to open my bottom sheet. I also created an empty component for the middle tab, so the space is created to fit the overlay button in the middle. It's not ideal but that's the only way I found unless I missed something and it's already possible?If it's not possible natively at the moment, what would it take to make the iOS and Android implementation? Would it requires a lot of code changes to make it work? Any pointers on what to change? I would try digging into the native code if it's not too complicated to implement.
I'm not sure what the API could look like, maybe:
Beta Was this translation helpful? Give feedback.
All reactions