I’ve read a lot about building UI that supports multiple screen resolutions on android. I understand the concept of sp and dp.
Lets say I’m developing a news reader app. I have an list of articles. The list contains small images and titles. Once an item is touched, a bigger version of the image and full article text is visible. The images will be loaded from web. Should I provide biggest available resolution images and rely on the android to scale them when displayed, or should I convert screen densities at runtime to pixels and download images of the appropriate size?
Your answer depends on what YOU think is going to have the most positive or negative impact for the user. This means that you’ll have to step outside of your own box for a moment.
Images are some of the most expensive network resources out there, so the first starting point is how large are the images? Next you need to know how large the average screen is that will be using your app. (Often, it is going to be based on your design).
Your download size is
image_width X image_height X 4 bytes(failing compression, that is). If your fullscreen images are 1024 X 768 and you have 10 of them, for example, the result is too large to be desirable over 3G network, but a cakewalk over WiFi or 4G. In this case, asking for the appropriate size might be best.If your images don’t even take 1/2 of the screen and they are only loaded one at a time, downloading and resizing it in runtime is best.