当 ScrollView 较长时,React Native TabNavigator 会隐藏

React Native TabNavigator is hiding when ScrollView is long

我正在使用此库中的 TabNavigator https://reactnavigation.org/docs/navigators/tab 在屏幕上我有 ScrollView 它真的很长而且我的标签隐藏了,如何才能不隐藏标签?

代码如下:

const TabNav = TabNavigator({
    Home: {
        screen: Home,
        navigationOptions: {
            title: 'Home',
            headerLeft: null
        }
    },
    Notes: {
        screen: Notes,
        navigationOptions: {
            title: 'Notes',
            headerLeft: null
        }
    },
    Tasks: {
        screen: Tasks,
        navigationOptions: {
            title: 'Tasks',
            headerLeft: null
        }
    },
    Events: {
        screen: Events,
        navigationOptions: {
            title: 'Events',
            headerLeft: null
        }
    }
}, {
    tabBarOptions: {
        activeTintColor: 'green'
    },
});


const plannings = StackNavigator({
    Login: {
        screen: Login,
        navigationOptions: {
            header: null
        }
    },
    Register: {
        screen: Register,
        navigationOptions: {
            header: null
        }
    },
    Home: {
        screen: TabNav
    }
}, {
    headerMode: 'screen'
});

我找到了这个解决方案,它对我有用:

<View style={{flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: 'blue'}}>
     <View style={{height: 400, width: 400}}>                 
       <ScrollView>
         <View style={{backgroundColor: 'green'}}>
            // Your data here
         </View> 
      </ScrollView>
      <TextInput style={{backgroundColor: '#c4c4c4dd', position: 'absolute', bottom: 0, left: 0, right: 0}} />
    </View>
  </View>