を変更しないコードです:ここはネイティブリアクト - ネイティブベースフッターはここで色
// 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',
私は直接編集FooterTab.jsを試していないましたが、何のは全く変化。
レンダー時に発生する可能性のある変更はtabActiveBgColor: platform === 'ios' ? '#1569f4' : '#1569f4'
です。そして、私はなぜこのコードだけが働いているのかわからなくても、私はactive
をFooterTab
に設定していません。
私が期待したのは、ボタンをアクティブにしてテキストを白にすることです。
解決策はありますか?
リアクトネイティブとナティどのバージョンのコード - 私のソースあなたはいますか? –