react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

V3: BottomTab's visibility doesn't work

Open opiruyan opened this issue 7 years ago • 15 comments

Issue Description

hiding bottom tab doesn't work. on iOS it just remains on the bottom on the screen. on Android results in a black space on the bottom of the screen

Steps to Reproduce / Code Snippets / Screenshots

Navigation.setDefaultOptions({
            bottomTabs: {
                visible: false,
            }
        });

Environment

  • React Native Navigation version: 3.2.0, 3.1.1, 3.1.2
  • React Native version: 0.61.2
  • Platform(s) (iOS, Android, or both?): iOS and Android
  • Device info (Simulator/Device? OS version? Debug/Release?): simulator and device. iOS 12.4.2. Android 9

opiruyan avatar Oct 23 '19 11:10 opiruyan

Issue Description

hiding bottom tab doesn't work. on iOS it just remains on the bottom on the screen. on Android results in a black space on the bottom of the screen

Steps to Reproduce / Code Snippets / Screenshots

Navigation.setDefaultOptions({
            bottomTabs: {
                visible: false,
            }
        });

Environment

  • React Native Navigation version: 3.2.0, 3.1.1, 3.1.2
  • React Native version: 0.61.2
  • Platform(s) (iOS, Android, or both?): iOS and Android
  • Device info (Simulator/Device? OS version? Debug/Release?): simulator and device. iOS 12.4.2. Android 9

bottomTabs: { visible: false, animate: false, drawBehind: true, },

You used this options?

khorark avatar Oct 23 '19 12:10 khorark

@khorark Of course.

Apparently, on iOS part

- (void)rnn_setTabBarVisible:(BOOL)visible animated:(BOOL)animated

is called with

visible = YES

though it is false on a js-side.

So setting

visible = NO

inside ite method hides tabs, but leaves the space, which is somewhat similar to Android.

opiruyan avatar Oct 23 '19 12:10 opiruyan

@opiruyan I'm also hidden bottom tabs and this work for android and ios. Version RNN 3.2.0

khorark avatar Oct 23 '19 13:10 khorark

@khorark well, the story that It used to work on v2. And the issue appeared just after upgrading RN version to and RNN. No changes to the code were made whatsoever.

opiruyan avatar Oct 23 '19 13:10 opiruyan

Unfortunately, I am facing the same problem: in my defaultOptions I have added this

bottomTabs: { visible: false, animate: false, drawBehind: true, },

without luck. The result is this. ( the bottom tab bar upon the white bar is my custom one ).

image

davidmarinangeli avatar Oct 30 '19 10:10 davidmarinangeli

Same is happening here. It worked fine on V2

edferreira avatar Nov 06 '19 18:11 edferreira

When I set bottomTabs: { visible: false, animate: false, drawBehind: true, } at defaultOptions it's not working, but doing with the Navigation.push works as expected. Thanks @khorark

edferreira avatar Nov 06 '19 20:11 edferreira

When I set bottomTabs: { visible: false, animate: false, drawBehind: true, } at defaultOptions it's not working, but doing with the Navigation.push works as expected. Thanks @khorark

I can confirm that using push gives me the correct behavior. Unfortunately, I need defaultOptions to work too.

davidmarinangeli avatar Nov 11 '19 16:11 davidmarinangeli

For customizing android bottom bar, as i have curved borders in the design, I am trying to hide bottomTabs and create a custom one. But as i am making visible:false,drawBehind:true; finding a white space in android, is there any hack for removing white space or alternatives on how i can customize bottom Tabs.

itsaju avatar Nov 12 '19 11:11 itsaju

@ArjunRajesh I had the same problem, solved it by creating a custom one with Navigation.showOverlay and then you can set the height based on const { bottomTabsHeight } = await Navigation.constants()

diegoprates avatar Nov 25 '19 13:11 diegoprates

Any update on this? @diegoprates your workaround does not work on my app, unfortunately

davidmarinangeli avatar Dec 12 '19 10:12 davidmarinangeli

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.

stale[bot] avatar Jan 11 '20 10:01 stale[bot]

This is still an issue!

samparmenter avatar Jan 16 '20 15:01 samparmenter

Hey guys, this is fixed in v5. Sorry for the inconvenience.

guyca avatar Feb 08 '20 14:02 guyca

Hey guys, this is fixed in v5. Sorry for the inconvenience.

hello this is not working on version 7.15.0

92sajid110 avatar Jun 02 '21 15:06 92sajid110