Hier ist der Code:Reagieren Native - Mutterunter Footer nicht die Farbe ändern
// 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',
ich direkt bearbeiten FooterTab.js habe versucht, aber nicht überhaupt geändert.
Die einzigen Änderungen, die beim Rendern auftreten können, sind tabActiveBgColor: platform === 'ios' ? '#1569f4' : '#1569f4'
. Und ich weiß nicht einmal, warum nur dieser Code funktioniert, ich habe auch keinen active
auf FooterTab
gesetzt.
Was ich erwartet habe ist, wenn ich aktiv bin, werden der Button und der Text weiß.
Jede Lösung?
Welche Version von React Einheimische und Nati Bist du auf? –