-
Notifications
You must be signed in to change notification settings - Fork 24.2k
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
Default textColor of #000000 on Android #24540
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. I agree with the current conversation in discussions-and-proposals: things should be consistent with the platform, not across platforms with React Native. However, at the same time there are basic UX behaviors that we should make sure are as consistent as possible by default.
That being said, it is unlikely that an app will use the default text color on Android – at least I haven't seen any of the top apps use it. In a case like this it makes sense to share the default across platforms. In general my advice would be to always use the platform defaults unless:
- We can set a more sensible default for things that almost all users commonly would want to change, or if users forget to set a sensible default themselves. This is most common with user experience and behavior rather than looks.
- There is no proper platform default or every app will want to change the default.
Again, we must be mindful here to not make React Native apps look like they do not belong on the platform they are built for. We want React Native apps to look and feel native to the platform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
This pull request was successfully merged by @JonnyBurger in 0851d5f. When will my fix make it into a release? | Upcoming Releases |
Summary
By default, the text color is
#000000
on iOS and different on Android, e.g.#808080
, depending on the manufactorer.This PR changes it so that newly created projects all have the text color
#000000
by default on both iOS and Android.The argument for this is to make the app by default be more consistent between platforms.
Expo also does this: https://github.com/expo/expo/blob/master/android/expoview/src/main/res/values/styles.xml#L31
For context and for your consideration, I have started a discussion here with the topic of whether React Native should try to use OS defaults or be consistent between platforms:
react-native-community/discussions-and-proposals#121
Changelog
[Android] [Changed] - New projects have a
#000000
by default.Test Plan
I have added this line to my project and it would set the default color to black.