react native 0.59 安卓9上文字显示不全

请修改字体样式 在app入口文件添加如下代码

const React = require('react');
const { Platform, Text } = require('react-native');

const defaultFontFamily = {
	...Platform.select({
		android: { fontFamily: 'Roboto' }
	})
};

const oldRender = Text.render;
Text.render = function(...args) {
	const origin = oldRender.call(this, ...args);
	return React.cloneElement(origin, {
		style: [defaultFontFamily, origin.props.style]
	});
};

即可解决

你可能感兴趣的:(react native 0.59 安卓9上文字显示不全)