我正在做一个react原生项目,我使用了react- native -bootsplash作为我的启动画面。问题是闪屏上的徽标图像太小,因为闪屏徽标的建议大小是100。有没有办法调整镜像的大小或者使用bootsplash生成的@5x镜像??
发布于 2021-10-16 18:40:24
我在react-native-bootsplash的文档(https://www.npmjs.com/package/react-native-bootsplash)上找到了这个:
react-native generate-bootsplash <logoPath>命令有几个参数:
Options:
--background-color <color> color used as launch screen background (in hexadecimal format) (default: "#fff")
--logo-width <width> logo width at @1x (in dp - we recommand approximately ~100) (default: 100)
--assets-path [path] path to your static assets directory (useful to require the logo file in JS)
--flavor <flavor> [android only] flavor build variant (outputs in an android resource directory other than "main")
-h, --help output usage information所以,如果你想创建一个大于默认大小100的启动启动,你可以这样做:
yarn react-native generate-bootsplash assets/bootsplash_logo_original.png \
--background-color=F5FCFF \
--logo-width=300 \
--assets-path=assets \
--flavor=main我只会确保你的徽标有足够高的质量,这样你的bootsplash看起来仍然很好。
https://stackoverflow.com/questions/69595217
复制相似问题