u/Frexuz

▲ 2 r/expo

Why is it too tall? I'm expecting the red to be the 'end' of the screen, but there's extra space below it. It should not scroll that far, it should "snap back" to its original location when releasing the scrollview..

Screen has super simple code:

import { ScrollView, Text } from 'react-native'

export default function ApplicationsTab() {
  return (
    <ScrollView
      contentInsetAdjustmentBehavior="never" // Have tried all different values here
      contentContainerClassName="grow-1 items-center justify-center bg-red-500"
    >
      <Text className="text-lg font-semibold text-on-surface">
        Applications
      </Text>
    </ScrollView>
  )
}

The screen's _layout.tsx does nothing special:

import { useTheme } from '@react-navigation/native'
import { Stack } from 'expo-router'

export default function ApplicationsTabLayout() {
  const { colors } = useTheme()
  return (
    <Stack
      screenOptions={{
        contentStyle: { flex: 1, backgroundColor: colors.background }, // Have tried without flex here
      }}
    >
      <Stack.Screen name="index" options={{ title: 'Applications' }} />
    </Stack>
  )
}

Anyone has any ideas?

u/Frexuz — 20 days ago