首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在react-native-bootsplash中调整启动屏幕图像的大小

在react-native-bootsplash中调整启动屏幕图像的大小
EN

Stack Overflow用户
提问于 2021-10-16 11:35:00
回答 1查看 422关注 0票数 1

我正在做一个react原生项目,我使用了react- native -bootsplash作为我的启动画面。问题是闪屏上的徽标图像太小,因为闪屏徽标的建议大小是100。有没有办法调整镜像的大小或者使用bootsplash生成的@5x镜像??

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-10-16 18:40:24

我在react-native-bootsplash的文档(https://www.npmjs.com/package/react-native-bootsplash)上找到了这个:

react-native generate-bootsplash <logoPath>命令有几个参数:

代码语言:javascript
复制
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的启动启动,你可以这样做:

代码语言:javascript
复制
yarn react-native generate-bootsplash assets/bootsplash_logo_original.png \
  --background-color=F5FCFF \
  --logo-width=300 \
  --assets-path=assets \
  --flavor=main

我只会确保你的徽标有足够高的质量,这样你的bootsplash看起来仍然很好。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69595217

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档