• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Images for multi screen support

 
Ranch Hand
Posts: 99
Android Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello friends,

I have confusion regarding multi screens support in android. I have gone through article for multi screen support at android developer forum. My question is if app has 15-20 images that need to be shown full screen on device screen. Now if I want to support all screens what resolution & densities images i should put in three folders ldpi, mdpi & hdpi. Here what i am doing till now

In ldpi - images of 240x320 resolution
mdpi - images of 320x480 reolution
hdpi - images of 720x800 resolution.
(I am using same densities for all three resolution)
I think this is not right approach.

What exactly I should do? Put images of different resolution in drawable-ldpi, drawable-mdpi & drawable-hdpi as above or should i use images of different densities 120 dpi, 160 dpi & 240 dpi. If i use images of different densities what should be their resolution(should 120 dpi resolution be 240x320, 160 dpi resolution 320x480 & 240 dpi resolution be 480x800). Or if i am using different dpi images their resolution should be same(320x480) for all densities .

Regards,
Anuj
 
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think Android uses the image density - it just goes by the pixel size and scales as needed. One thing to try would be to use a single "drawable" directory (i.e., delete the more specific ones) and put images with a 480 pixel width in it (which for the time being should be large enough for all phones).
 
Anuj Prashar
Ranch Hand
Posts: 99
Android Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for replying.

I have tried that using images of 480x800 resolution. It does not look good when tested on device(samsung galaxy 3) or emulator of resolution 320x480 mdpi. Images look compressed, there are horizontal compression lines that are slightly visible.
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the approach you mentioned in your first post doesn't produce satisfactory results, maybe you need to do it programmatically: ship images of various sizes with the app, detect the screen size with your code, and then pick and display an image of appropriate size.
 
Lookout! Runaway whale! Hide behind this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic