-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Title is not aligning to center #3071
Comments
Having the same issue. Only on Android |
Here is what worked for me: const styles = StyleSheet.create({
navigationBarTitleStyle: {
// centering for Android
flex: 1,
textAlign: 'center'
}
});
...
<Scene
titleStyle={styles.navigationBarTitleStyle}
...
... |
The problem with aligning the title manually is that it becomes lopsided once icons like the back button are added. It is centered in an element that has been pushed over by the icon element. |
Okay, I found it out. Don't style the title to center it, as I mentioned before, it will look ugly once icons added to back title text.
Place the above in your top level scene. For some reason, on Android the title is defaulted to the left, even though the documentation says it's supposed to default to the center. Here's mine:
|
Version
Expected behaviour
Title will be aligned to center.
Actual behaviour
Title still remaining on the left side (default).
Steps to reproduce
Remark: On version v4.0.0-beta.28 it is working perfectly.
The text was updated successfully, but these errors were encountered: