Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make headerLargeTitle appear as large title when the component is a flat list

I have a FlatList component and I want the title to be large. I defined the navigator as follows

export const SamplerStackNavigator = () => (
  <Stack.Navigator
    screenOptions={{
      headerLargeTitle: true,
    }}
  >
    <Stack.Screen name="Flat List" options={{}} component={TheList} />
  </Stack.Navigator>
);

However, it just shows the small header. I can scroll down manually to make the large header appear, but I want to make it appear large by default.

https://snack.expo.dev/@trajano/multi-tab-navigation-with-refresh

On the "Home" tab I have

enter image description here

When I switch to the other tab (the header is small by default)

enter image description here

You can pull it down and it will render to the size I want.

enter image description here

like image 717
Archimedes Trajano Avatar asked Sep 11 '25 15:09

Archimedes Trajano


1 Answers

const Stack = createNativeStackNavigator();

function MyStack() {
  return (
    <Stack.Navigator>
      <Stack.Screen
        name="Home"
        options={{
          headerLargeTitle: true,
        }}
        component={HomeScreen}
      />
    </Stack.Navigator>
  );
}

Finde more details here for iOS

like image 176
ilidiocn Avatar answered Sep 13 '25 05:09

ilidiocn