Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can i change Header Bar height in react native?

i’m trying to change Header Bar height in React-Native Stack Navigator

this is my code

I tried to put headerStyle: height:’100′, but it doen’t work

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

what should i do?

    const LoginNavigator = () => {
      return (
        <Stack.Navigator>
          <Stack.Screen
            name="Login"
            component={Login}
            options={{
              title: 'MOVIEAPP',
              headerTransparent: true,
              headerTintColor: '#E70915',
              headerTitleStyle: {
                fontWeight: 'bold',
              },
               headerStyle:{
                height:100,            // i tried to put height
              }
            }}
          />
        </Stack.Navigator>
      );
    };

>Solution :

can you update the options prop to the following and let me know if it works?

options={{
    title: 'MOVIEAPP',
    headerTitleStyle: {
      fontWeight: 'bold',
    },
     headerStyle:{
      height:200,            // i tried to put height
      backgroundColor: 'red'
    }
}}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading