timomeh / react-native-material-bottom-navigation

💅🔧👌 a beautiful, customizable and easy-to-use material design bottom navigation for react-native
MIT License
710 stars 127 forks source link

Bottomview cover whole screen? and position click issue #83

Closed ZeroCool00 closed 6 years ago

ZeroCool00 commented 6 years ago

After implementing bottomview i m not able to add other view's

screenRender() {
        if (this.state.screen === 0) {
            return <Workspace />;
        } else if (this.state.screen === 1) {
      return <Account />;
    }
  }

render() {
      return (
        <Text>Hello</Text> // not showing 
        <View style={styles.container}>
          {this.screenRender()}
          <BottomNavigation
            labelColor="white"
            rippleColor="white"
            style={styles.bottomBarStyle}
            innerStyle={{ paddingBottom: 48 }}
            onTabChange={(newTabIndex) => this.setState({ screen: newTabIndex })}
          >
         ........
        </BottomNavigation>
      </View>
      );
    }

and if i click on position 2 its render position 0 , if i click on position 3 it render position 0. i have to select twice per each position to be selected, first time its always render position 0,

see there is no text showing in screen, bottomview should be wrap to bottom whatsapp image 2018-04-24 at 2 14 13 pm

ZeroCool00 commented 6 years ago

Bottomview cover whole screen is Fix now.. i remove styles.xml and its working now.. it seems windowTranslucentNavigation covering the whole screen, it fix but now i m not able to animate navigationbar,

about second issue is still remain.. no matter what position i select it is animating index = 0 position.

timomeh commented 6 years ago

In order to set a tab to active, use <BottomNavigation activeTab={this.state.screen} ...

ZeroCool00 commented 6 years ago

@timomeh i get it now.. thanks for the quick reply.