react-native - react-native 中 android 和 iOS 的图像大小

标签 react-native react-native-android react-native-ios

在制作 iOS App 时,我们通常会提供 @x、@2x、@3x 图片。根据我对 android 的了解,大约有六种不同的尺寸

我已经开始研究 react-native 并遇到了图像问题。

我的问题是:我是否需要提供所有不同尺寸的图像(即通过结合 iOS 和 android 提供大约 6-7 个图像集)或者只有 1 个图像和其余的将在内部处理?它在更高分辨率的手机上看起来会模糊吗?

谢谢。

最佳答案

您仍然需要提供多个图像。根据Images文档,如果您使用名为 check.png 的图像,您还必须包含 check@2x.pngcheck@3x.png .

引用:

The packager will bundle and serve the image corresponding to device's screen density. For example, check@2x.png, will be used on an iPhone 7, whilecheck@3x.png will be used on an iPhone 7 Plus or a Nexus 5. If there is no image matching the screen density, the closest best option will be selected.

关于react-native - react-native 中 android 和 iOS 的图像大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42282252/

相关文章:

reactjs - React Native 中 Java 单例的等价物是什么?

geolocation - React-Native 地理定位中的超时和maximumAge是什么

javascript - 无法解析自己的模块 - Expo

android - React Native - 禁用 "Screen Size"设置

javascript - 试图传递 JSON 对象 REACTJS 不工作

react-native - 将 React Native 从 0.62.2 升级到 0.63.0 在空白屏幕上挂起

android - 新依赖 React native - gradle clean - 无法解析所有依赖

react-native - React Native 使用不同的 props 导航到同一页面

React-native fbsdk 构建错误

javascript - 如何在其他 App Container - React Navigation 中获取参数?