I have used React native snackbar to display backend response in my application. If I increase the device font size of the font size of snackbar message also increasing. I want to fixed the font size of snackbar text. Here is my code.
import Snackbar from 'react-native-snackbar';
webServiceHelper.requestResetPassword(this.state.username, this.state.selectedLanguage)
.then(response => {
if (response.error == false) {
this.setState({
isLoading: false
}, () => {
setTimeout(() => {
Snackbar.show({
title: 'Incorrect Credentials',
duration: Snackbar.LENGTH_INDEFINITE,
backgroundColor: 'red',
action: {
title: 'Please check again',
onPress: () => this.props.navigation.navigate('Login'),
color: 'white',
},
})
}, 1000);
}
I used the below code to fixed the font size of <Text>
tags. But it's not working for snackbar.
if (Text.defaultProps == null) Text.defaultProps = {};
Text.defaultProps.allowFontScaling = false;
Are there any suggestions to solve this issue.