我正在開發一個應用程序,它在底部選項卡導航器中有三個屏幕。當我從一個屏幕轉到另一個屏幕時,我能夠更改標簽顏色,但是,我也無法更改圖標的顏色。這是到目前為止的樣子的示例。這是我控制它的 App.js 代碼。我非常感謝對此的任何幫助或指導。預先感謝您的任何幫助!應用程序.js:function MainTabNavigator() { return ( <Tab.Navigator tabBarOptions={{ activeTintColor: '#e64951', }} > <Tab.Screen options={{ headerShown: false, tabBarIcon: ({ tintColor }) => ( <Entypo name="home" size={30} color={tintColor} /> ) }} name="home" component={Home} /> <Tab.Screen options={{ headerShown: false, tabBarIcon: () => ( <FontAwesome5 name="plus" size={30} color="black" /> ) }} name="Add Friends" component={AddFriends} /> <Tab.Screen options={{ headerShown: false, tabBarIcon: ({ tintColor }) => ( <FontAwesome name="user" size={30} color={tintColor} /> ) }} name="Profile" component={Profile} /> </Tab.Navigator> )}
在反應本機底部選項卡導航器中更改屏幕時如何更改圖標和文本的顏色?
暮色呼如
2024-01-18 09:49:12