Hide a screen in the Bottom tab navigator

Hi all!
So i am wanting to hide a screen in the Bottom tab.
So basicly i have 4 screens.
And When the user is in screen 1 i want screen 2 to be visible and screen 1 hidden and When the user is in screen 2 i want screen 2 to be hidden and screen 1 to be visible.
Is this possible?
Thanks

2 Likes

The screen navigator at the top is actually a button.
You can wrap them in a navigator drawer (There will be no stacking levels. ), and then use a few buttons to complete (using program control).

2 Likes

So basically you want to “remove” from navigator the current screen a user is using at a time.
Thinking about the very essence of a navigator, it helps you navigate through screens. So it display all the screens bound to it. I don’t think you programmatically can change that. But I’m just a beginner. Maybe someone more advanced can give you a work around and ill be very happy to “play” through blocks with navigator`s properties too :thinking:
The only thing I learned until now from @muneer was to change a screen name displayed in navigator through blocks, but event that takes place only after that screen become active.

3 Likes

Yes kind of.
But screen 1 and 2 Will be hidden depending on the screen the user is in, but screen 3 and 4 Will always be visible.

2 Likes

I may have found a way to do it, however i have no Idea how to Use this block:
Screenshot_20211102-202343_Chrome

1 Like

This is the options of the React Native Navigator module. This will not help you to hide the screen. It will help you to change the title of the screen for example.

See this (although for an old release but works similar)
https://reactnavigation.org/docs/1.x/navigation-options/

image

1 Like

Thanks!
Just a guestion (off-tpoic) i am also trying to change the background color and inactive/active tint color.
Do you know if i can do that with this block aswel?
Thanks

1 Like

Typically, it should be part of the navigator options block but you would only know if you try it.

1 Like

I Will try it.
Just thought you may knew it.
Thanks

1 Like

Sorry for the wrong info.

I just checked React Native documentation. The options you asked about are not part of the Navigator Options and therefore will not help coding them in it.

1 Like

That’s okay.

I’ll fill a future request: