wix / react-native-navigation

A complete native navigation solution for React Native
https://wix.github.io/react-native-navigation/
MIT License
13.04k stars 2.67k forks source link

Custom top bar title alignment: center broken on android #5531

Closed bdrobinson closed 4 years ago

bdrobinson commented 4 years ago

Issue Description

According to https://wix.github.io/react-native-navigation/#/docs/layout-types?id=custom-topbar-title I should be able to set topBar.title.component.alignment to center and my custom title component will be centred. I'm finding that it works as expected on iOS, but on Android it always acts as if I'd set it to fill.

It always used to work for us, but stopped working when I upgraded from v2.13.1 to v3.2.0 (running RN 0.61.1). I also found this similar-looking issue – could they be related? https://github.com/wix/react-native-navigation/issues/5236

Environment

Thanks!

loga4 commented 4 years ago

plus one

vovka-s commented 4 years ago

for me too

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.

bdrobinson commented 4 years ago

Feel like this must still be broken if there's not been any activity on this issue.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.

stale[bot] commented 4 years ago

The issue has been closed for inactivity.

guibas741 commented 4 years ago

still facing this problem

robert-adryan commented 4 years ago

I faced this issue as well on Android where I can't press the right button because of the 'fill' alignment, and as a small workaround I added a width to the custom topBar component

<View style={{width: Dimensions.get("window").width - 120}}> {/ title /}

samparmenter commented 3 years ago

Yeah, this is causing me all sorts of problems with the title not being centred when theres either a right or left button. Works fine with a text title but not a custom component.

mwahlig commented 3 years ago

I was able to workaround this by using alignSelf styling when configuring my custom topBar title component:

passProps: {
  style: {
    alignSelf: 'center',
  },
},
alexandrughinea commented 3 years ago

Still facing this issue.

kabus202 commented 3 years ago

@guyca can we reopen this? still exist in in 7.16.0