react native paper header Appbar.Content issue

Add flex:0 in last’s App.Bar content style like

<Appbar.Content
      onPress={() =>
       props.goback ? navigation.goBack() : navigation.navigate('Profile')
      }
      title={
      <TouchableOpacity
        onPress={() =>
          props.goback ? navigation.goBack() : navigation.navigate('Profile')
        }
        style={{flexDirection: 'row', display: 'flex'}}>
        <Icon name={'ellipsis-vertical'} size={20} color={'#000'} />
        <Text style={{color: textColor, fontSize: 21}}>test</Text>
      </TouchableOpacity>
     }
     style={{flex: 0}} // Update with this style will solve the issue
 />

Check exmaple Snack

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top