简体   繁体   中英

different resolutions vs dpi

I would like to get advice, pros and cons, about using different resolution graphics or resize them with dip size.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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