"@react-navigation/material-top-tabs": "^6.2.1"
"expo": "^45.0.0",
return (
<View>
<ScrollView >
<View>
<TitleH2 color={colors.white} style={{marginHorizontal:20, marginBottom:20}}>Ervaringen in gebied</TitleH2>
</View>
<View >
<DestinationTabs/>
</View>
</ScrollView>
</View>
)
return (
<Tab.Navigator
screenOptions={{
tabBarIndicatorStyle:{ backgroundColor:colors.green_500, },
tabBarActiveTintColor: colors.green_500,
tabBarScrollEnabled: true,
lazy: true,
}}
sceneContainerStyle={{
backgroundColor: colors.green_500,
}}
>
<Tab.Screen name="Tab1" component={TabSceen1} />
<Tab.Screen name="Tab2" component={TabSceen1} />
<Tab.Screen name="Tab3" component={TabSceen1} />
<Tab.Screen name="Tab4" component={TabSceen2} />
</Tab.Navigator>
);
I was only able to display the screen when giving the navigator a fixed height. But then it's not scrollable and the content is not properly displayed.
Is there a way to make the screen display in a scrollview where the height is displayed based on the content size in side a screen, and where it's also able to be scrolled?
How do you make the tab screens appear in a scrollView
use this contentContainerStyle={{flex: 1}} in side scroll view
<ScrollView contentContainerStyle={{flex: 1}}/>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.