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

[RNN2 Android bottomTab Switch labels afterward hide Tabs style problem]

Open qiepeipei opened this issue 8 years ago • 9 comments

Issue Description

[RNN2 Android bottomTab Switch labels afterward hide Tabs style problem]

Steps to Reproduce / Code Snippets / Screenshots

Navigation.setRoot({

  bottomTabs: {
      children: [
        {
          component: {
            name: 'navigation.GoodsScreen',
            passProps: {
              text: 'This is tab 1',
            },
            options: {
              bottomTab: {
                title: 'aaa',
                icon: require('../images/transport.png'),
                testID: 'FIRST_TAB_BAR_BUTTON1'
              }
            }
          }
        },
        {
          component: {
            name: 'navigation.GoodsScreen',
            passProps: {
              text: 'This is tab 1',
            },
            options: {
              bottomTab: {
                title: 'bbb',
                icon: require('../images/contacts.png'),
                testID: 'FIRST_TAB_BAR_BUTTON3'
              }
            }
          }
        }

      ],
      options: {
        bottomTabs: {
          tabColor: 'rgba(163,165,168,1)',
          selectedTabColor: 'rgba(38,152,243,1)',
          backgroundColor: 'white',
          fontSize: 12,
          testID: 'BOTTOM_TABS_ELEMENT'
        }
      }
    }

});

<View style={{flex:1,backgroundColor:"#f0f0f0"}}> <View style={{flexDirection:'row'}}>

        <Button style={{marginRight:10}} onPress={()=>{this.onClickRegPush(false)}}>
        <Text >hide</Text>
        </Button>
        <Button onPress={()=>{this.onClickRegPush(true)}}>
          <Text >show</Text>
        </Button>

    </View>

onClickRegPush = async (state)=>{

await Navigation.mergeOptions(this.props.componentId, {
  bottomTabs: {
    visible:state,
    animate: true
  }
});

}

[FILL THIS OUT - It will be extremely helpful] 555


Environment

  • React Native Navigation version: 2.0.2241
  • React Native version: 0.54.4
  • Platform(s) (iOS, Android, or both?): Android
  • Device info (Simulator/Device? OS version? Debug/Release?): Debug

qiepeipei avatar Apr 24 '18 09:04 qiepeipei

@qiepeipei Can you please add more info regarding the issue - it's a bit hard trying to understand an issue from a gif and a mouse gestures.

guyca avatar Apr 25 '18 19:04 guyca

@guyca gif already edited please help me

qiepeipei avatar May 03 '18 07:05 qiepeipei

Hey @qiepeipei If you intend to hide the Bottomtabs, you need to layout the screen behind the BottomTabs. Add the following to your screen's options:

bottomtabs: {
  drawBehind: true
}

Just note that it's still not implemented - will try to implement it asap

guyca avatar May 03 '18 08:05 guyca

thank you happy

qiepeipei avatar May 03 '18 09:05 qiepeipei

From what I understand this is a duplicate of #2996 which will be addressed soon.

guyca avatar May 14 '18 16:05 guyca

@qiepeipei set translucent true works for you bro, am I wrong @guyca ? I tried and it's working fine. Related to #3209

yusufyildirim avatar May 15 '18 20:05 yusufyildirim

@guyca The problem is still . drawBehind fields Not working . Click on the tab will be a problem

qiepeipei avatar May 16 '18 03:05 qiepeipei

@guyca RNN version 2.0.2288 The problem is still .

qiepeipei avatar May 16 '18 05:05 qiepeipei

@qiepeipei The issue still hasn't been addressed. This is a duplicate of #2996 and will be resolved soon.

guyca avatar May 16 '18 06:05 guyca