这是代码:
// 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',
here is the result:
我尝试直接编辑 FooterTab.js 但根本没有改变。
渲染时可能发生的唯一更改是tabActiveBgColor: platform === 'ios' ? '#1569f4' : '#1569f4'
。我什至不知道为什么只有这个代码可以工作,我什至没有设置任何active
on FooterTab
.
我期望的是,当我设置为活动按钮时,文本会变成白色。
有什么解决办法吗?
我已经解决了这个问题,添加了样式页脚标签.您不需要在本机库中进行任何样式设置Footer组件。这是我的源代码-
<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>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)