I. Problem
Recently I am developing an app using Expo Bare Workfow. I tried to use custom font called Campton to my project. When I run yarn ios , everything works fine on iOS, the font appears black as its default color. However, when I start using yarn android , everything still works fine except the font appear grey instead of black as its default color. I have tried to change to another color (e.g. #C30017) but still the color remain grey on Android.
I tried to use react-native-cli to generate fresh new project instead of using expo-cli, everything works fine and I am able to change the font color through styles.xml for Android.
II. My Approach to Solve
-
Add custom font to the project => run npx react-native-link
-
Edit the android:textColor at my_project/android/app/src/main/values/styles.xml
-
Found the answer on forum / community
-
Find the source code regarding the grey color on expo
III. Result
IV. Expected Result
The default font color is black, and I am able to change the font color through android:textColor at my_project/android/app/src/main/values/styles.xml
V. Environment
Expo CLI 4.3.2 environment info:
System:
OS: macOS 11.2.3
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 14.15.0 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.11 - /usr/local/bin/npm
Managers:
CocoaPods: 1.10.1 - /Users/jaico/.rvm/gems/ruby-2.6.5/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
Android SDK:
API Levels: 23, 24, 25, 27, 28, 29
Build Tools: 29.0.0, 29.0.1, 29.0.2, 29.0.3, 30.0.0, 30.0.1, 30.0.2, 30.0.3, 31.0.0
System Images: android-27 Google Play Intel x86 Atom, android-29 Google APIs Intel x86 Atom
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.7042882
Xcode: 12.4/12D4e - /usr/bin/xcodebuild
npmPackages:
react: 16.13.1 => 16.13.1
react-native: 0.63.4 => 0.63.4
npmGlobalPackages:
expo-cli: 4.3.2
Expo Workflow: bare