android - Mobile Design: Should I be using double resolution images? -


the galaxy s5 has display resolution of 1920 x 1080, iphone 1334 x 750, , many others similar. these resolutions work same way apple's retina screens work, images blurry unless have @2x size version?

basically, if creating mobile landing page add, , use image 300px wide in browser, image sharp in browser or need else make sure looks on mobile devices?

if you're talking photos or photo-like images, android resizes , fair job of avoiding unpleasant image artifacts because uses accurate rescaling methods.

anything expect "pixel-perfect" 2px-wide line in image blurry in resized result. those types of images, you'd want generate different resolution versions of images in drawables-* (or mipmap-*) folders , keep in mind relationship between screen density , pixels.

  • mdpi 1:1
  • hdpi 1.5:1
  • xhdpi 2:1
  • xxhdpi 3:1
  • xxxhdpi 4:1 (and you're unlikely find right now)

...so if wanted 1px border in image that's displayed on xxhdpi screen, in drawable file line need 3px wide. news since these downscale , upscale quite accurately, under circumstances, image drawables-xxhdpi retain clean edge when downsized others (except hdpi, because 1.5) , image drawables-mdpi upscale decently well. android best can @ picking appropriate image upscale/downscale drawables/mipmaps folders when missing (i.e., might not need populate all of them).


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -