Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to hide tabbar item in tabs #3058

Closed
jie opened this issue May 29, 2018 · 7 comments
Closed

How to hide tabbar item in tabs #3058

jie opened this issue May 29, 2018 · 7 comments

Comments

@jie
Copy link

jie commented May 29, 2018

Version

  • react-native-router-flux v4.0.0 (v3 is not supported)
  • react-native v0.45.1

Expected behaviour

222222

Actual behaviour

1527579578082

Steps to reproduce

In v3.0, I can create a scene without icon and tabContent, it will not show in tabbar,
but in v4.0.0, it will show an tab item with empty label and empty icon.

<Scene key="main" initial={true} tabs={true} >
  <Scene key="Home" component={Home} title={'TITLE'} />
  <Scene
    key="HotNews1"
    text="hotNews_title"
    icon={TabIcon}
    component={HotNewsPage}
    tabContent={{
      iconSource: ICON_1,
      selectedIconSource: SL_ICON_1
    }} />
  
  <Scene
    key="HotNews2"
    text="hotNews_title"
    icon={TabIcon}
    component={HotNewsPage}
    tabContent={{
      iconSource: ICON_1,
      selectedIconSource: SL_ICON_1
    }} />
</Scene>
@EnginYilmaz
Copy link

import { StatusBar} from 'react-native'; at top of your file and in your render() function
<StatusBar hidden={true} />
should work

@aksonov
Copy link
Owner

aksonov commented Jun 6, 2018

Looks like v4 doesn't support it. PR is welcome (it should not be difficult to filter by icon and tabContent). But I really suggest you to change your nav hierarchy - move away Home if it is not part of tabbar.

@aksonov aksonov closed this as completed Jun 6, 2018
@kr0000
Copy link

kr0000 commented Jun 30, 2018

@jie any progress here? i have the same issue.

@kr0000
Copy link

kr0000 commented Jun 30, 2018

@aksonov i have the same problem - how can i hide icon on menu any ideas?

@jie
Copy link
Author

jie commented Jul 3, 2018

@kr0000 I use custom tabbar instead

@RobinJayaswal
Copy link

@jie did you extend react-navigation TabBarBottom? Do you mind posting the code for the custom tabbar you ended up using?

@jie
Copy link
Author

jie commented Oct 20, 2018

@RobinJayaswal
No, I don't use react-navigation,
here is the code:

                                <Scene
                                    key="main"
                                    initial={true}
                                    tabs={true}
                                    showLabel={false}
                                    tabBarComponent={TabBar}
                                    tabBarStyle={styles.tabBarStyle}
                                    tabBarPosition={"bottom"}
                                >

TabBar is a React.Component

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants