-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android/iOS title rendering inconsistent? #24
Comments
We haven't done work on laying out the nav bar contents on Android. So we don't intend for it to look broken, but also haven't worked on making it look good either. |
Any idea on the timeline for this or a workaround? |
As a rough estimate, I imagine we will look into this by the end of December. |
I tried quickly playing with the |
Here's our workaround that's worked reasonably well: <ExNavigator
renderNavigationBar={props =>
<Navigator.NavigationBar
{...props}
navigationStyles={Navigator.NavigationBar.StylesIOS}
/>
}
/> |
Is the goal of ex-navigator to make navigation look the same for all platforms? |
@samuelkraft that looks great, could you please share the change you made to |
+1 |
Edit: renderBackButton has been added as a prop to For the default back button download it here: https://design.google.com/icons/#ic_arrow_back renderLeftButton(navigator) {
if (Platform.OS === 'android') {
return (
<TouchableOpacity
touchRetentionOffset={ExNavigator.Styles.barButtonTouchRetentionOffset}
onPress={() => navigator.pop()}
style={[ExNavigator.Styles.barLeftButton, styles.backButtonAndroid]}>
<Image source={require('./images/backAndroid.png')} />
</TouchableOpacity>
);
}
} and style the button: backButtonAndroid: {
paddingLeft: 16,
paddingVertical: 15
}, |
Thanks @samuelkraft ! @ide what's the Android roadmap like for this? Is the goal to have a conventional Material style for the Android Navigator? |
Although everybody know this issue, I'm explaining for newcomers; Probably as you know, Actually there is no a problem. Because, according to Android navigation design , there is a back button on the top-left corner and the current page title next to the it. And top-right area has been left for other tools like buttons or another title. Unlike, iOS has a back button and previous screen title on the top-left of the screen. Title is in the middle. Because of these reasons, I think the approach of @samuelkraft is true. However, a cross-platform solution would be great. Actually @ide has succeeded that the auto navigation bar style according to the OS. For instance; |
@delta1, I tried adding as you said but it didn't work for me. I am using 0.27. <ExNavigator Am I missing something here? |
sorry @sudharsan1988 this was back in 0.16/17 days so I have no idea what's changed. gl hf |
For iOS title is centred while for Android is left-aligned. Is this a intended behaviour.
The text was updated successfully, but these errors were encountered: