2017-05-04 87 views
0

下面是代码:阵营原住民 - 天然碱基页脚不变色

// Bottom.js 
<StyleProvider style={getTheme(commonColor)}> 
    <Footer> 
     <FooterTab> 
      <Button active> 
       <Icon active name="food" size={24} /> 
       <Text active>Lunch Box</Text> 
      </Button> 
      <Button> 
       <Icon name="coins" size={24} /> 
       <Text>Point</Text> 
      </Button> 
      <Button> 
       <Icon name="face" size={24} /> 
       <Text>Profile</Text> 
      </Button> 
     </FooterTab> 
    </Footer> 

</StyleProvider> 

// commonColor.js 

// Footer 
footerHeight: 55, 
footerDefaultBg: '#ffffff', 

// FooterTab 
tabBarTextColor: '#FFF', 
tabBarTextSize: platform === 'ios' ? 14 : 16, 
activeTab: platform === 'ios' ? '#007aff' : '#fff', 
sTabBarActiveTextColor: '#007aff', 
tabBarActiveTextColor: '#fff', 
tabActiveBgColor: platform === 'ios' ? '#1569f4' : '#1569f4', 

这里是结果: Result

我已经尝试过直接编辑FooterTab.js但没有改变过。

渲染发生的唯一变化是tabActiveBgColor: platform === 'ios' ? '#1569f4' : '#1569f4'。我甚至不知道为什么只有这个代码工作,我甚至没有设置任何activeFooterTab

我期望的是当我设置激活按钮和文本变白。

任何解决方案?

+0

什么版本的阵营和本地人娜提veBase你在吗? –

回答

0

您需要platform.js改变tabActiveBgColor值不commonColor.js

1

我已经解决了这个问题,在添加风格FooterTab。你不需要做任何造型的天然碱基页脚 component.Here是我的源代码 -

 <Footer> 
      <FooterTab style={{backgroundColor:"#FFF"}}> 
       <Button style={{paddingLeft:0, paddingRight:0}}> 
        <Text}}>iFeeds</Text> 
       </Button> 
       <Button style={{paddingLeft:0, paddingRight:0}}> 
        <Text}}>iFeeds</Text> 
       </Button> 
      </FooterTab> 
    <Footer> 

My output is

相关问题