2017-05-04 86 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

相關問題