!!Beginner to React Native and RN Paper.
I'm trying to use React Native Paper elements like Button and TextInput. I coded the button like below code,
<Button
icon="camera"
mode="contained"
loading="true"
style={styles.button}
contentStyle={{
height: 50,
backgroundColor: "#2196f3",
}}
labelStyle={{
fontFamily: "Raleway-Bold",
fontSize: 15,
}}
>
Login button
</Button>
With this code, I was able to get a button with Camera icon.
But the problem started when I started to load my custom fonts with Font.loadAsync for loading custom fonts (Raleway-Bold).
import { Button, TextInput } from "react-native-paper";
import {
View,
TouchableWithoutFeedback,
Keyboard,
TouchableOpacity,
} from "react-native";
const Login = () => {
return (
<View >
<Button
icon="camera"
mode="contained"
loading="true"
>
Login button
</Button>
</TouchableOpacity>
</View>
);
};
export default Login;
In app.js I've loaded the custom fonts using
Font.loadAsync({"Raleway-Bold": require("./assets/fonts/Raleway-SemiBold.ttf")})
After this, I'm getting errors like,
fontFamily "Material Design Icons" is not a system font and has not been loaded through Font.loadAsync.
If you intended to use a system font, make sure you typed the name correctly and that it is supported by your device operating system.
If this is a custom font, be sure to load it with Font.loadAsync.
Anyone have faced similar kinds of issues?
Note: Using the latest expo version.
Thanks in Advance for your time.