简体   繁体   English

Android屏幕密度:多少个密度?

[英]Android Screen Densities: how many densities?

I am developing an Android app that downloads images from an S3 bucket and displays them full screen on the phone. 我正在开发一个Android应用程序,该程序可从S3存储桶下载图像并将其全屏显示在手机上。

How many different densities should I create in the S3 bucket for each image, in order to include both phones and tablets? 为了同时包含手机和平板电脑,我应该在S3存储桶中为每个图像创建多少种不同的密度?

What about for Apple devices (again, both phones and tablets)? 对于Apple设备(还是手机和平板电脑)呢?

Note : I have read the Android Supporting Multiple Densities help page. 注意 :我已阅读Android 支持多种密度的帮助页面。 I have also found similar questions on Stackoverflow, but they are 3-4 year old and new devices have popped up since then. 我在Stackoverflow上也发现了类似的问题,但是它们已经使用了3-4年,从那以后出现了新设备。

Thanks! 谢谢!

You could include one of them or all of them, that depends on how many densities you want your images to look good. 您可以包含其中之一,也可以全部包含,这取决于您希望图像看起来不错的密度。 The answer to this question depends on how much you care about it. 这个问题的答案取决于您对它的关心程度。 If you don't care and just want it to work, add only one. 如果您不在乎,只是希望它可以工作,请仅添加一个。

For Android you have: 对于Android,您具有:

ldpi (low) ~120dpi
mdpi (medium) ~160dpi
hdpi (high) ~240dpi
xhdpi (extra-high) ~320dpi
xxhdpi (extra-extra-high) ~480dpi
xxxhdpi (extra-extra-extra-high) ~640dpi

And for iPhone: 对于iPhone:

normal
 @2x
 @3x

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM