Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

react navigation title wrapped

With react navigation, StackNavigator, simple header title is getting wrapped. How do I display the full title? In below code, title is Personal Information. But the title does not show full on iPhone 5s device and simulator.

Versions:

  1. "react-navigation": "^1.0.0-beta.11"
  2. "react-native": "^0.47.2"

    static navigationOptions = { title: "Personal Information" };

enter image description here

like image 609
suman j Avatar asked Dec 13 '22 21:12

suman j


1 Answers

Resolved it. Specifying the headerTitleStyle with width matching to device width solve it.

static navigationOptions = {
    title: "Personal Information",
    headerBackTitle : null,
    headerTitleStyle : {width : Dimensions.get('window').width}
};
like image 175
suman j Avatar answered Dec 28 '22 07:12

suman j