Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native Tab Bar white space under tabs

I am using a tab bar navigator with SafeAreaView.

If I comment out the tab bar nav the parent view covers the entire screen. However when I add a Tab bar it shows a small white view under the tab bar section.

const App = () => {
  return (
    <SafeAreaView style={styles.droidSafeArea}>
      <View style={{ backgroundColor: "red", flex: 1 }}>
        <TabNavigator key="MainTabNav" />
      </View>
    </SafeAreaView>
  );
};

export default App;

const styles = StyleSheet.create({
  droidSafeArea: {
    flex: 1,
    backgroundColor: "#2F3438",
  }
});

enter image description here

like image 458
mKane Avatar asked Nov 06 '22 15:11

mKane


1 Answers

Try this

  screenOptions={{
                        tabBarStyle: {
                            paddingBottom:0,         
                        },
                }}
like image 131
Franklin Rocha Avatar answered Nov 14 '22 21:11

Franklin Rocha