不同尺寸的手机屏幕其需要图片的分辨率和尺寸

 

不同尺寸的手机屏幕其需要图片的分辨率和尺寸不同,如下。

设备名称

屏幕尺寸

逻辑分辨率(pt)物理分辨率(px)缩放因子
iPhone 4、4S3.5寸320 x 480640 x 960@2x
iPhone 5、5S、5C、SE4寸320 x 568640 x 1136@2x
iPhone 6、6S、7、84.7寸375 x 667750 x 1334@2x
iPhone 6P、6SP、7P、8P5.5寸414 x 7361242  x 2208@3x
iPhone X、XS5.8寸375 x 8121125 x 2436@3x
iPhone XR6.5寸414 x 896828 x 1792@2x
iPhone XS Max6.5寸414 x 8961242 x 2688@3x
---------------
iPod Touch 43.5寸320 x 480640 x 960@2x
iPod Touch 5、64寸320 x 568640 x 1136@2x
---------------
7.9'' iPad mini 47.9寸768 x 10241536 x 2048@2x
9.7'' iPad9.7寸768 x 10241536 x 2048@2x
10.5'' iPad Pro 10.5寸834 x 11121668 x 2224@2x
12.9'' iPad Pro 12.9寸1024 x 13662048 x 2732@2x

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

App Launch Image:  640x960    640x1136    750x1334   1125x2436   1242x2208

App Store: 1242 x 2208  1242 x 2688

App Icon:  (40 x 40  60 x 60)    (icon_small)    (icon_spotlight)    (icon_60)     (1024 x 1024)

 

该工具可快速生成所需App Icon:

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Android Studio 打包后不同手机屏幕启动图变形的问题,可能是因为不同手机屏幕尺寸分辨率导致的。为了解决这个问题,可以尝试以下几种方法: 1. 使用适配多个屏幕的启动图:在 Android Studio 中,可以在 res/drawable 文件夹中创建不同分辨率的启动图,例如: ``` drawable-ldpi/launch_screen.png // 240×320 drawable-mdpi/launch_screen.png // 320×480 drawable-hdpi/launch_screen.png // 480×800 drawable-xhdpi/launch_screen.png // 720×1280 drawable-xxhdpi/launch_screen.png // 1080×1920 ``` 这样,在不同分辨率手机上,系统会自动选择对应的启动图,从而避免启动图变形的问题。 2. 使用 9-patch 图片:9-patch 图片是一种可以自动缩放的图片格式,可以在不同分辨率手机上保持图片的形状不变。在 Android Studio 中,可以使用 Draw 9-patch 工具创建 9-patch 图片,然后作为启动图使用。 3. 使用代码动态设置启动图:在 AndroidManifest.xml 文件中设置启动图时,可以使用代码动态设置启动图,从而根据不同手机屏幕尺寸分辨率来选择不同的启动图。可以在 onCreate 方法中设置启动图,例如: ```java @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); DisplayMetrics displayMetrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(displayMetrics); int screenWidth = displayMetrics.widthPixels; int screenHeight = displayMetrics.heightPixels; if (screenWidth == 1080 && screenHeight == 1920) { // 使用 1080×1920 的启动图 } else if (screenWidth == 720 && screenHeight == 1280) { // 使用 720×1280 的启动图 } else { // 使用默认的启动图 } } ``` 希望以上方法可以帮助你解决 Android Studio 打包后不同手机屏幕启动图变形的问题。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值