Cannot Center Align Header Title in react-native android

Using stack navigation I have defined the header Title by making it a child component as below

Headertitle.js

render(){
   return(
        <View style={{flexDirection:'row',justifyContent:'center'}}>
        <Text style={{fontSize:RF(3),fontWeight:'bold',color:'#fff'}}>XYZ</Text>
        <Text style={{fontSize:RF(3),color:'#fff'}}>ABC</Text>
        </View>
)}

Parent Component using this header

 static navigationOptions = ({ navigation }) => {
              return {
                headerTitle:(<Headertitle/>),
                headerTitleStyle: {flex: 1, textAlign: 'center'},
                headerRight: (
                  <Icon
                    onPress={navigation.getParam('handleLogout')}
                    name="power-off"
                    type="font-awesome"
                    color="#fff"
                     style={{marginRight:20}}
                    size={RF(4)}
                    backgroundColor="#006DB7"
                  />
                ),

                headerLeft:null
              };
            };

It works very well in IOS but cannot be center aligned in Android. Please help. Thanx in advance

105 thoughts on “Cannot Center Align Header Title in react-native android”

  1. Do you have a spam issue on this site; I also am a blogger, and I was curious about your
    situation; we have created some nice procedures and we are looking to trade strategies
    with others, please shoot me an e-mail if interested.

    Reply
  2. You’re so interesting! I do not believe I’ve read anything like this before.
    So nice to find someone with original thoughts on this
    issue. Really.. thanks for starting this up. This site is
    one thing that’s needed on the web, someone with a little originality!

    Reply
  3. Hey! Quick question that’s totally off topic. Do you know how to make your site mobile friendly?
    My weblog looks weird when browsing from my iphone.
    I’m trying to find a template or plugin that might be
    able to correct this issue. If you have any suggestions, please share.
    With thanks!

    Reply
  4. Hello! Quick question that’s completely off topic. Do you know how to make your site
    mobile friendly? My weblog looks weird when browsing from my apple iphone.
    I’m trying to find a theme or plugin that might be able to correct this issue.
    If you have any suggestions, please share. Thank
    you!

    Reply
  5. I think that is one of the so much significant info for me.
    And i am happy reading your article. But
    wanna statement on some normal issues, The site taste is ideal, the articles is in reality nice :
    D. Excellent job, cheers

    Reply
  6. An impressive share! I have just forwarded this onto a coworker who has been doing a little homework on this.
    And he in fact bought me lunch simply because I
    stumbled upon it for him… lol. So allow me to reword this….
    Thanks for the meal!! But yeah, thanks for spending time to talk about this subject
    here on your site. scoliosis surgery https://0401mm.tumblr.com/ scoliosis
    surgery

    Reply
  7. I enjoy you because of all of your work on this blog. Gloria delights in working on internet research and it’s simple to grasp why. We all learn all about the lively means you provide valuable steps via the website and as well as foster participation from other ones on the point plus our own child has been discovering so much. Take pleasure in the remaining portion of the new year. You’re carrying out a remarkable job. blog

    Reply
  8. Pingback: hiv gay dating

Leave a Comment