I followed this tutorial: https://medium.com/#gattermeier/custom-fonts-in-react-native-for-android-b8a331a7d2a7#.aw559w53u
My font is located here: android/app/src/main/assets/fonts
And it's lowercase: 04b03.ttf
But it doesn't work, why ?
SOLVED:
I followed this tutorial too: https://blog.bam.tech/developper-news/add-a-custom-font-to-your-react-native-app
Then I deleted and then I rebuild the app
Related
https://developers.google.com/fonts/docs/material_symbols
I was following this developer guide and there is instructions for iOS and android apps but none for react native. I was wondering if there's any npm packages that can render material symbols for react. Only way i know is to download the svgs and serve from an assets folder.
You can use react-native-vector-icons to import your font and icoMoon to define the name of each icon.
See the documentation here: React Native Vector Icons - Custom Fonts
I've created a react native app and trying to add some ads following admob doc and when I add setContentView(R.layout.activity_main); in MainActivity.java in Android Studio it gives me this error: 'cannot resolve symbol activity_main'.
I don't have a layout folder in res (have re-created the app and still nothing).
Do I need to create layout and add activity_main.xml to it? And in that case, what do I add to the xml file?
No
You don't have to touch the native code of android of react native only for exceptional cases.
Follow an online tutorial to do the work.
How add How add addmob with react native on google
After integrating "react-native-zendesk-support" ti my ios project and followed all the giver steps i got an error while building ios app
'React/RCTAnimationType.h' file not found
enter image description here
I have used to 'chalet' fonts in react-native app. This font doesn't work in 'iOS build', but it works fine in Android build. I have tried with other fonts , but it's works fine in both the builds iOS and android.
Can you please check this link for Font-family .ttf files.
If you guys found any solution, please help me !!
Usually font name is different for iOS and android,
Please follow below link to know the name of font for iOS,
https://medium.com/react-native-training/adding-custom-fonts-to-react-native-b266b41bff7f
and apply font according to platform name
I am using native-base library in react native. I have done following steps to change font but it does not work:
I pasted myfont.ttf in this directory:
node_modules/native-base/Fonts
I went to the following directory:
node_modules/native-base/src/theme/variables/...
and changed all font families into myFont.ttf in all three files (commonColor.js, material.js and platform.js)
Please help me in this issue.
You have to first eject NativeBase's theme, you can do that by
following the docs
here.
Then, add font to Android and iOS respectively, this
article
shows a good guide on how to do that.
Lastly, you can update the theme with your custom font on ./native-base-theme/variables/<theme-you-use>.js, also describe on the same docs above