简体   繁体   English

不同的分辨率vs dpi

[英]different resolutions vs dpi

I would like to get advice, pros and cons, about using different resolution graphics or resize them with dip size. 我想获得有关使用不同分辨率图形的建议,优点和缺点,或者使用dip尺寸调整它们的大小。

I mean, if my ap will have all possible resolution, one way is to create the pngs for each one, ldp/mdp/hdp/xhdp, but I am thinking that to save work and time maintaining the app, maybe is easier, to include pngs with maximal resolution, xhdp, and to specify the size well in the .xml or in the .java with dip or relative size depending on the screen. 我的意思是,如果我的ap将有所有可能的解决方案,一种方法是为每个创建pngs,ldp / mdp / hdp / xhdp,但我认为为了节省工作和维护应用程序的时间,可能更容易,到包括具有最大分辨率的pngs,xhdp,并根据屏幕在.xml或.java中指定大小,具有倾角或相对大小。

What is your opinion on that? 你对此有何看法? Pros and Cons? 优点和缺点?

Regards, 问候,

Cons (against having only one size): Unnecessary use of memory. 缺点(仅限一种尺寸):不必要地使用内存。 Images are memory-hungry objects, and when you multiply its resolution twice you multiply its memory cost by 4. Low-resolution devices are likely to have less memory as well and loading unnecessary big images could cause memory exceptions. 图像是需要大量内存的对象,当你将其分辨率乘以两倍时,你的内存成本就会增加4.低分辨率设备也可能拥有更少的内存,加载不必要的大图像可能会导致内存异常。

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

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