React-native-navigation TabNavigator selected status and height issu

clipboard.png

//
const Tabs = TabNavigator({
    NewsList: {
        screen: NewsList,
        navigationOptions: {  // static navigationOptions
            tabBarLabel: "",
            tabBarIcon: ({tintColor}) => (<Icon name="ios-home" size={26}/>),
        }
    },
    AddressBook: {
        screen: AddressBook,
        navigationOptions: {
            tabBarLabel: "",
            tabBarIcon: ({tintColor}) => (<Icon name="md-git-network" size={26}/>),
        }
    },
    GovernmentAffairs: {
        screen: GovernmentAffairs,
        navigationOptions: {
            tabBarLabel: "",
            tabBarIcon: ({tintColor}) => (<Icon name="ios-apps" size={26}/>),
        }
    },
    Life: {
        screen: Life,
        navigationOptions: {
            tabBarLabel: "",
            tabBarIcon: ({tintColor}) => (<Icon name="md-basket" size={26}/>),
        }
    },
    Main: {
        screen: Main,
        navigationOptions: {
            tabBarLabel: "",
            tabBarIcon: ({tintColor}) => (<Icon name="ios-contact" size={26}/>),
        }
    }
  }, {
      animationEnabled: true, // 
      tabBarPosition: "bottom", // android 
      swipeEnabled: true, // tab
      lazy: true,// 
      backBehavior: "none", //  back Tab() none 
      tabBarOptions: {
          activeTintColor: "-sharp028ce5", // 
          inactiveTintColor: "-sharp999", // 
          showIcon: true, // android  icon,  true 
          indicatorStyle: {
              height: 0  // TabBar0
          }, 
          style: {
              backgroundColor: "-sharpfff", // TabBar 
            //   height: 44,
              borderTopColor: "-sharpccc",
              borderTopWidth:1,
              padding: 0,
          },
          labelStyle: {
              fontSize: 10, // 
          },
      },
});

1. Why didn"t icon change the color when selected?
2. After setting the height, why is the tabBar display incomplete and the bottom obscured?
ask for advice

Mar.04,2021

the first problem is that if you don't set tintColor, in the Icon tab, it certainly won't change the color.
second question, try to write the Tab height higher


the first problem is to add style= {{color:tintColor}}
to the icon tag. The second question needs to modify the style of the label, and adjust the position through relative positioning

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e45c3a-65177.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e45c3a-65177.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?