createStackNavigator Title Issue
up vote
0
down vote
favorite
I have the following createDrawerNavigator
for a portion of my navigation file:
const DrawerNavigation = createDrawerNavigator({
Home:
screen: HomePage,
navigationOptions:
title: "Home"
,
Loads:
screen: LoadTabs,
navigationOptions:
title: "Loads"
,
LoadsDetails:
screen: LoadsDetails,
navigationOptions:
title: "Load Details"
,...
And then I have the actual createStackNavigator
set referencing the above:
const StackNavigation = createStackNavigator(
DrawerNavigation: screen: DrawerNavigation
,
headerMode: 'float',
navigationOptions: ( navigation, screenProps ) => (
headerStyle: backgroundColor: '#4C3E54' ,
headerTintColor: 'white',
headerLeft: drawerButton(navigation),
headerRight: cartButton(navigation, screenProps)
)
);
My problem is that, while everything works, the title never shows up for any of the screens. Am I setting them up incorrectly in the createDrawerNavigator somehow? And if so, what would be the more appropriate way of doing so?
Thanks!
react-native react-native-navigation
add a comment |
up vote
0
down vote
favorite
I have the following createDrawerNavigator
for a portion of my navigation file:
const DrawerNavigation = createDrawerNavigator({
Home:
screen: HomePage,
navigationOptions:
title: "Home"
,
Loads:
screen: LoadTabs,
navigationOptions:
title: "Loads"
,
LoadsDetails:
screen: LoadsDetails,
navigationOptions:
title: "Load Details"
,...
And then I have the actual createStackNavigator
set referencing the above:
const StackNavigation = createStackNavigator(
DrawerNavigation: screen: DrawerNavigation
,
headerMode: 'float',
navigationOptions: ( navigation, screenProps ) => (
headerStyle: backgroundColor: '#4C3E54' ,
headerTintColor: 'white',
headerLeft: drawerButton(navigation),
headerRight: cartButton(navigation, screenProps)
)
);
My problem is that, while everything works, the title never shows up for any of the screens. Am I setting them up incorrectly in the createDrawerNavigator somehow? And if so, what would be the more appropriate way of doing so?
Thanks!
react-native react-native-navigation
have you tried changing headerMode ? are you getting the navbar render just title missing or nothing at all ?
– Ahsan Sohail
Nov 11 at 7:59
@AhsanSohail - The navbar does appear with the left and right icons that I have set, so I know it's at least partially set up right...
– inuShiva
Nov 12 at 0:45
1
try using headerTitle instead of just title
– Ahsan Sohail
Nov 12 at 7:15
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have the following createDrawerNavigator
for a portion of my navigation file:
const DrawerNavigation = createDrawerNavigator({
Home:
screen: HomePage,
navigationOptions:
title: "Home"
,
Loads:
screen: LoadTabs,
navigationOptions:
title: "Loads"
,
LoadsDetails:
screen: LoadsDetails,
navigationOptions:
title: "Load Details"
,...
And then I have the actual createStackNavigator
set referencing the above:
const StackNavigation = createStackNavigator(
DrawerNavigation: screen: DrawerNavigation
,
headerMode: 'float',
navigationOptions: ( navigation, screenProps ) => (
headerStyle: backgroundColor: '#4C3E54' ,
headerTintColor: 'white',
headerLeft: drawerButton(navigation),
headerRight: cartButton(navigation, screenProps)
)
);
My problem is that, while everything works, the title never shows up for any of the screens. Am I setting them up incorrectly in the createDrawerNavigator somehow? And if so, what would be the more appropriate way of doing so?
Thanks!
react-native react-native-navigation
I have the following createDrawerNavigator
for a portion of my navigation file:
const DrawerNavigation = createDrawerNavigator({
Home:
screen: HomePage,
navigationOptions:
title: "Home"
,
Loads:
screen: LoadTabs,
navigationOptions:
title: "Loads"
,
LoadsDetails:
screen: LoadsDetails,
navigationOptions:
title: "Load Details"
,...
And then I have the actual createStackNavigator
set referencing the above:
const StackNavigation = createStackNavigator(
DrawerNavigation: screen: DrawerNavigation
,
headerMode: 'float',
navigationOptions: ( navigation, screenProps ) => (
headerStyle: backgroundColor: '#4C3E54' ,
headerTintColor: 'white',
headerLeft: drawerButton(navigation),
headerRight: cartButton(navigation, screenProps)
)
);
My problem is that, while everything works, the title never shows up for any of the screens. Am I setting them up incorrectly in the createDrawerNavigator somehow? And if so, what would be the more appropriate way of doing so?
Thanks!
react-native react-native-navigation
react-native react-native-navigation
asked Nov 11 at 6:39
inuShiva
1414
1414
have you tried changing headerMode ? are you getting the navbar render just title missing or nothing at all ?
– Ahsan Sohail
Nov 11 at 7:59
@AhsanSohail - The navbar does appear with the left and right icons that I have set, so I know it's at least partially set up right...
– inuShiva
Nov 12 at 0:45
1
try using headerTitle instead of just title
– Ahsan Sohail
Nov 12 at 7:15
add a comment |
have you tried changing headerMode ? are you getting the navbar render just title missing or nothing at all ?
– Ahsan Sohail
Nov 11 at 7:59
@AhsanSohail - The navbar does appear with the left and right icons that I have set, so I know it's at least partially set up right...
– inuShiva
Nov 12 at 0:45
1
try using headerTitle instead of just title
– Ahsan Sohail
Nov 12 at 7:15
have you tried changing headerMode ? are you getting the navbar render just title missing or nothing at all ?
– Ahsan Sohail
Nov 11 at 7:59
have you tried changing headerMode ? are you getting the navbar render just title missing or nothing at all ?
– Ahsan Sohail
Nov 11 at 7:59
@AhsanSohail - The navbar does appear with the left and right icons that I have set, so I know it's at least partially set up right...
– inuShiva
Nov 12 at 0:45
@AhsanSohail - The navbar does appear with the left and right icons that I have set, so I know it's at least partially set up right...
– inuShiva
Nov 12 at 0:45
1
1
try using headerTitle instead of just title
– Ahsan Sohail
Nov 12 at 7:15
try using headerTitle instead of just title
– Ahsan Sohail
Nov 12 at 7:15
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53246447%2fcreatestacknavigator-title-issue%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
have you tried changing headerMode ? are you getting the navbar render just title missing or nothing at all ?
– Ahsan Sohail
Nov 11 at 7:59
@AhsanSohail - The navbar does appear with the left and right icons that I have set, so I know it's at least partially set up right...
– inuShiva
Nov 12 at 0:45
1
try using headerTitle instead of just title
– Ahsan Sohail
Nov 12 at 7:15