【发布时间】:2019-08-05 08:53:48
【问题描述】:
我是一名 iOS 开发者,最近开始用 React-native 开发一个 APP。 在 iOS 中,我们提供 3 种类型的图像 x、@2x 和 @3x 来支持所有设备。根据一些开发者网站/博客,在使用 android 时,我看到他们使用许多分辨率图像大小,如 ldpi、mdpi、hdpi、xhdpi 等。
我的问题是
所以,在 react-native 中,我应该使用什么尺寸的图像,以便它适合 iOS 和 Android 设备。
在我的登录屏幕中,我使用的图像尺寸是“640 X 1138”和“750X1334”,但在 Android 设备中,图像在屏幕的顶部和底部被修剪,在 iOS 设备中,这很好.
【问题讨论】:
-
为什么不使用 SVG 格式,这样就不用为每个屏幕尺寸在项目中放置多个图像了。
-
@Amas:我不知道 SVG 格式的图像,会检查它们
-
简单说明:
Unlike raster formats seen in JPG, GIF, and PNG, an SVG image remains crisp and clear at any resolution or size.
标签: android react-native react-native-android react-native-ios